How to change Visual Studio 2012 install directory

2019-01-16 23:31发布

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:

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:

9条回答
迷人小祖宗
2楼-- · 2019-01-17 00:01

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.

查看更多
Fickle 薄情
3楼-- · 2019-01-17 00:01

Try launching the installer with the following option:

/p CustomInstallPath="[your_path]"

For example:

vs_ultimate.exe /p CustomInstallPath="C:\MyDirectory"

To see all options use the switch /?

查看更多
ら.Afraid
4楼-- · 2019-01-17 00:02

I dont have the rep to comment on the post above. Although he is correct in the syntax of those command switches, the program is bugged, it doesnt work with selecting the CustomInstallPath. In fact, for me, it just decides to open about 50+ iterations of vs_ultimate.exe in the process list...

I will try the Hard Junction as mentioned above as I am sure that will work.

As a sidenote, if anyone is interested, you can use the switch that allows you to acquire the installation ahead of time by running vs_ultimate.exe /Layout X:\somefolder\

I did that last night and hopefully my installation will go quickly since i havea ll the info, however I think in order to force it to use the offline version, you have to run vs_ultimate.exe /noweb.

This page refers to all the switches: http://msdn.microsoft.com/en-us/library/e2h7fzkw(v=vs.110).aspx

The above pages notes that: /p CustomInstallPath "Installs all re-targetable packages in the directory that you specify." Thay may mean that silently, whatever it is able to install off of your root drive, it will, but its hard to be certain and I have limited space on my SSD.

Before I try the hard junction, I may also try the above and see what heppens, then uninstall it if need be. Will post results

查看更多
一纸荒年 Trace。
5楼-- · 2019-01-17 00:06

For me the final visual studio 2012 wanted to install into the same path as the (uninstalled) beta. I deleted most of the stuff in HKLM that had an exact match for the setup directory (ending with a \ e.g. C:\VS11Beta\) and then the setup let me choose again.

Probably not a solution for the OP(M:\Program Files sounds too generic to delete), but perhaps for others with this problem.

查看更多
We Are One
6楼-- · 2019-01-17 00:11

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/

查看更多
该账号已被封号
7楼-- · 2019-01-17 00:12

I had previously installed the VS 2012 Test Controller. Uninstalling it allowed me to change the install path.

查看更多
登录 后发表回答