Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio installation path grayed out

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:

enter image description here

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?

like image 869
Philippe Paré Avatar asked Nov 03 '15 03:11

Philippe Paré


People also ask

Where is Visual Studio installation path?

The \Microsoft\VisualStudio\Shared directory is where Visual Studio stores the files that are shared by side-by-side Visual Studio installations. SDKs and tools are also stored in this directory.

Where is Visual Studio 2019 installation path?

Normally, the path is something like C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ . From Visual Studio, one can use $(VCInstallDir)$ to get this path.

Why is Visual Studio installer not installing?

Deleting the Visual Studio Installer files and then rerunning the bootstrapper solves some update failures. Performing the following actions reinstalls the Visual Studio Installer files and resets the installation metadata. Close the Visual Studio Installer. Delete the Visual Studio Installer installation directory.

How do I change the default installation path for Visual Studio 2019?

Open the registry, go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup and there you will find some files. At least one of these files should contain the old path. Delete the file and the installation should work now. This was the only answer that actually made sense and worked for me, at least with VS 2019.

How do I change the location of my Visual Studio installation files?

Specify the folder path, including the drive, where you want to store the installation files and manifests from the download cache. You can select a different location only when you first install Visual Studio. If you've already installed it and want to change the location, you must uninstall Visual Studio and then reinstall it.

How do I install a version of Visual Studio?

Here's how. When you install Visual Studio, choose the Installation locations tab. In the Visual Studio IDE section, accept the default. Visual Studio installs the core product and includes files that are specific to this version of Visual Studio.

Why can't I change the shared components and tools path?

If you've installed Visual Studio on your computer before, you won't be able to change the Shared components, tools, and SDKs path and it will appear greyed out. Sometimes, things can go wrong. If your Visual Studio installation fails, see Troubleshoot Visual Studio installation and upgrade issues for step-by-step guidance.


2 Answers

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

like image 172
Piyatorn Boss Avatar answered Sep 24 '22 15:09

Piyatorn Boss


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.

  1. Download it
  2. Extract it
  3. 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.

like image 44
Daniel Budick Avatar answered Sep 20 '22 15:09

Daniel Budick