Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
117 views
in Technique[技术] by (71.8m points)

How to change Visual Studio 2012 install directory?

I've uninstalled VS11 using the the windows installer, and deleted just about every registry key I could find relating to it, but it still pops up with this when I try to reinstall it:

image

And I can't click the "..." or edit the path. Right-clicking does nothing either.

What do I have to destroy to change the install directory?


Still happening in official release:

image

question from:https://stackoverflow.com/questions/10068991/how-to-change-visual-studio-2012-install-directory

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

HKLMSoftwareMicrosoftWindowsCurrentVersionInstallerUserDataS-1-5-21-776561741-789336058-725345543-318838Components31F687BD8A467D54C830E018D99F7F3B

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 = 'SOFTWAREMicrosoftVisualStudioSxSVS7'

  9. Searched for

    MicrosoftVisualStudioSxSVS7

    in Processmonitor

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...