Visual studio installation path grayed out
Solution 1
Run installer in command line (Admin Mode) In folder keep File vs_community_ENU.exe
and put this command
vs_community_ENU.exe /uninstall /force
Then put this
vs_community_ENU /CustomInstallPath C:\VisualStudio2015
NewDrive:\VisualStudio2015
it work for me
Hope this helps
Solution 2
I had the same problem. I had an installed Visual Studio on a crashed harddisk. I tried everything above, nothing worked. You should use this method as ultima ratio:
There is a VisualStudioUninstaller by Microsoft.
- Download it
- Extract it
- Run it with
Setup.ForcedUninstall.exe
in an administrator command prompt
If this fails: Start an elevated powershell:
install-package msi -provider PowerShellGet
get-msicomponentinfo '{777CBCAC-12AB-4A57-A753-4A7D23B484D3}' | get-msiproductinfo | uninstall-msiproduct -properties IGNOREDEPENDENCIES=ALL
Try again. If this fails, replace the GUID with one of the following:
Visual Studio 2015: {777CBCAC-12AB-4A57-A753-4A7D23B484D3}
Visual Studio 2013: {56E09E41-21B6-4F87-8D60-0787D028ECDD}
Visual Studio 2012: {DB786F13-64A8-45D7-8C03-0E819DF9F7B3}
Visual Studio 2010: {01696F98-947C-4CF9-8BD3-ABE70332FDED}
Sources: blogs.msdn.microsoft.com and landinghub.visualstudio.com
If this fails get an exorcist or/and reinstall your system.
Solution 3
I know you said it worked, but for some (including me) it did not. After multiple hours, however, I found a way. Here are the steps to my solution:
- If you have not uninstalled
VS2015
yet, do it through Control Panel. - Run the setup (
ect. vs_community.exe
). - If you cannot install on desired drive, keep reading here :)
- Copy the path from where the
VS2015
want you to install it on (e.g.:"D:\Programmer\Microsoft Visual Studio 14.0"
). - Open
regedit
(Just press windows key, type it in, and press Enter). - Warning, now you are in the windows registry, be careful or you may cause system-wide instability.
- Go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData
Here there should be 2 folders called something likeS-1-5-18
andS-1-5-21-345634235-23423416487
. Just start with the one with the smallest number. - Go into the
Components
folder, and here you should see many folders with numbers and letters as name. Right click on the first of these, and clickSearch
. ("Find" for Windows 10) - Paste the path from step
4.
here, and make sure that the 3 top boxes are checked (they should be by default). - Right-click the first result of the search and click
export
. Save it somewhere you remember, then right-click it again and delete it this time. - Run the
VS2015
setup again (vs_community.exe
) and check if you can change the path now. If not go back to9.
and continue. - If it worked, just install
VS2015
and just remember where you put your saved reg files. If anything goes wrong, you can restore them again by running the file.
Hope this helps someone!
Solution 4
This worked for me:
- Start
procmon
and run the VS installation. In
procmon
, find the relevant registry by looking for:"HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\*\Components"
Make sure the key you've found was successfully opened (result should be
SUCCESS
)- Open
regedit
and find the relevantComponents
folder. - Search for the key you have found.
- Export it for backup, and then delete it.
Hope it works for you too :-)
Solution 5
For me, it was the mistake of installing SQL Server Management Studio 2016 before installing Visual Studio 2015. SSMS 2016 is now based of VS 2015 Shell Core. And the new setup doesn't allow for any interaction except pressing the Install button. That way, part of VS 2015 was installed to C: drive. And hence, all options to change VS 2015 Enterprise install path failed.
I removed SMSS 2016 and, explicitly, VS 2015 Shell Core and then tried to install VS 2015 and it worked with Custom Path and Browse button.
![Philippe Paré](https://i.stack.imgur.com/FpAwE.jpg?s=256&g=1)
Philippe Paré
Software developer at Devolutions. Also working on a voxel based RPG. I Like regexes now, for some reason.
Updated on September 11, 2021Comments
-
Philippe Paré almost 3 years
I had to reformat one of my drives (T:) and change its purpose. I had Visual studio 2015 installed on it, uninstalled it before formatting and now the drive has a different letter (can't change it, other things installed on it). I want to install visual studio 2015 again, but on the C: drive. When I run the installation, I get this:
The T: drive doesn't exist anymore, and I can't change the installation path to another drive.
I tried some solutions where I had to delete registry keys, but didn't succeed since most of the solutions were for older versions of visual studio. Is there a way to change the path?
-
Philippe Paré over 8 yearsActually, using
/uninstall /force
was the solution. @HansPassant didn't make it an answer but at this point, I can't test your solution. Thanks for the consideration anyways! -
Emil Hansen over 8 yearsI know, just added it to help, because /uninstall /force did not work for me.
-
ElectroBit about 8 yearsNeither of these worked for me...I can just keep deleting registry keys and nothing happens.
-
Emil Hansen about 8 yearsHow many have you removed? I removed around 20 before it worked.
-
ElectroBit about 8 yearsI deleted ALL the registries pointing to the application except for one that can't be deleted, and it still doesn't work. WHAT GIVES!?
-
Emil Hansen about 8 yearsHmm, have you tried both regedit folders (e.x. S-1-5-18 and S-1-5-21-345634235-23423416487)?
-
ElectroBit about 8 yearsBy the way, editing the registry has apparently nuked Visual Studio, so I just reinstalled Windows...
-
Rob about 8 yearsI have downloaded RegScanner and let it search for the path it points to (in my case "E:\Visual Studio 2015"). I removed 12k+ regedit keys in the compontent folder. This finally worked. Thanks a bunch.
-
23W almost 8 years@Rob, Thank you. Your solution is helped me.
-
Felix D. over 7 yearsGreat, it worked. Although "vs_community_ENU.exe /uninstall /force" did not fully uninstall all secondary components of VS 15.
-
Rodrigo over 7 yearsHi. Great tip. I had to install, run your first line (/uninstall /force). I got confused by the "NewDrive:\VIsualStudio2015"... which on my case was f:\VisualStudio. Worked great.
-
Chris over 7 yearsWorked fine. After executing the uninstall tool multiple times and a reboot, i was able to change the install location.
-
user1175801 over 7 yearsI tried a bunch of the other options on this page and this was the one that actually worked for me.
-
Christopher K. about 7 yearsWorked great. But be aware that this uninstalls lots of stuff like .NET Framework and Microsoft C++ Redistributable. For me this broke some programs that require these things, but installing Visual Studio afterwards solved this.
-
klm123 about 6 yearsApplying this to vs_community__1758346211.1527346351.exe It says that only one command argument is allowed.
-
Duck Dodgers almost 6 yearsThis still didn't work. I need the exorcist! Looking to install Visual Studio 2017, with the packages in it for Visual Studio 2015 project support.
-
Juv almost 3 yearsThis was the only answer that actually made sense and worked for me, at least with VS 2019. Unfortunately I am working on a VM and the VM has been assigned 100gb of Hard Drive, and my option was to use a network drive but then I get
Drive P:\User\VS\Packages is not a fixed drive
, therefor I think this is unsolvable. My options are to try and remove some space on the HD, or request the IT to make the VM HD larger. Any other suggestions? -
KulaGGin almost 2 yearsThx. The other solutions with
/uninstall /force
and blindly deleting registry keys in\Components
didn't work. This worked. -
KulaGGin almost 2 yearsAbsolute cringe that we have to do this kind of stuff to install Visual Studio where we want it.