How to change Visual Studio 2012 install directory?

I had the same problem though instead of forcing me to install into "c:\program Files" it forced me to install to the directory which I used for the Visual Studio RC. After using Process Monitor and the setup's logfile I was able to find a registry key that needed to be deleted.

The key was located at

HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-21-776561741-789336058-725345543-318838\Components\31F687BD8A467D54C830E018D99F7F3B

The SID will most likely be different for other systems yet you might be able to find the last string (31F687BD8A467D54C830E018D99F7F3B)


In order to find the key I did the following:

  1. Downloaded ProcessMonitor from Sysinternals
  2. Started Processmonitor with filter

    Image Path ends with vs_premium.exe

  3. Started vs_premium.exe

  4. Closed the setup
  5. Waited until Processmonitor didn't fetch anymore events
  6. Opened the newest dd_vs_premium_.log file from %TEMP%
  7. Searched for something and found

    Condition 'VS_Install_path_KeyExists' evaluated to false. (i guess it will evaluate to true on affected systems. I tried this on a clean windows installation)

  8. One line above it said

    Registry key not found. Key = 'SOFTWARE\Microsoft\VisualStudio\SxS\VS7'

  9. Searched for

    Microsoft\VisualStudio\SxS\VS7

    in Processmonitor

  10. A few lines down ProcessMonitor shows me the key I had to delete


The only solution I've found is on Windows 7 to create a hard Junction link to the directory your wanting Visual Studio installed to.

For Example, My SSD drive is not my boot drive and has a drive letter of B:.

I run the following command line

mklink /J "C:\Program Files (x86)\Microsoft Visual Studio 11.0" "B:\Program Files (x86)\Microsoft Visual Studio 11.0"

To the installer and Windows it thinks it installed it to the Program Files x86 directory on C: drive when it really installed it to the Program Files x86 folder on B: drive.

Here's a link to page about creating Junction links in Windows Vista and 7. http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/


A simpler approach worked for me:

1 - Run the installer from the command line, with /uninstall /force switches, as in:

c:\vs_professional_ENU.exe /uninstall /force

2 - Re-run the installer normally.

I did this with VS2015 under Windows 10. Reference link.