Monday, August 9, 2010

Using MKLINK to create a Symbolic Link

With 64 bit systems you might be writing a bat file and you might want to generate your folder in the Program Files (x86). However to help make life easier for your user you could also create a symbolic link to the Program Files as well which is more or less a shortcut to your folder.

In my company we use Marimba to deploy to our shop servers. As stated above I wanted to create a symbolic link to my Program Files. Below is how I did it.

  1. Open Command Prompt (Admin). Start –> type “cmd” in search and hit Ctrl + Shift + Enter and it will open in Administrator mode, or hit Windows + R and type in “Cmd” either way works.
  2. Just to get a quick look at what MKLink. Type “mklink /?” to look at the help info.
  3. My command line looked like this: mklink /D “C:\Program Files\marimba” “C:\Program Files (x86)\marimba”
  4. The command line response was: “symbolic link created for C:\Program Files\marimba <<==>> c:\Program Files (x86)\marimba.”
  5. Browse to my C:\Program Files, and now I see a marimba folder that when I click it, takes me to my real URI location.