Change the default installation path for SQL Server Management Studio

Is it possible to change the default installation path when installing SQL Server Management Studio , which is C : . My C: drive is full because it has system applications, and I want to install SQL Server Management Studio in the D: drive, is this possible?

Thanks,

+10
source share
5 answers

There is no direct approach (finally now) to changing the installation path of SQL Server Management Studio by default, but you can use symbolic links :

What are symbolic links?

From the Complete Guide to Creating Symbolic Links (or Symbolic Links) on Windows :

Symbolic links are mostly advanced shortcuts. Create a symbolic link to a separate file or folder, and this link will look like a file or folder in Windows, even if it is just a link pointing to a file or folder.

Windows 10 users

Windows 10 users must first enable developer mode from

Settings> Update and security> For developers.

how

  1. Open Command Prompt or Windows PowerShell using Run as administrator and paste this command before installing SQL Server Management Studio.
 mkdir "D:\Program Files\Microsoft SQL Server" mkdir "D:\Program Files (x86)\Microsoft SQL Server" mklink /J "C:\Program Files\Microsoft SQL Server" "D:\Program Files\Microsoft SQL Server" mklink /J "C:\Program Files (x86)\Microsoft SQL Server" "D:\Program Files (x86)\Microsoft SQL Server" 
  1. Now install SQL Server Management Studio (SSMS).

There may be other files and folders on drive C , such as AppData\Local\Microsoft\Microsoft SQL Server but they are no more than 1 GB.

What to do if SSMS is already installed?

Close all SSMS instances and rename these folders to anything:

 C:\Program Files\Microsoft SQL Server C:\Program Files (x86)\Microsoft SQL Server 

Follow the instructions " How to" and move the contents of the folders (cut / paste) to a new location

 D:\Program Files\Microsoft SQL Server D:\Program Files (x86)\Microsoft SQL Server 
+10
source

To do this, update the registry value using the powershell script, and then run the installation. After installation, registry values ​​are reset to their default values.

Update the default installation directory

 $RegKey ="HKLM:\Software\Microsoft\Windows\CurrentVersion" Set-ItemProperty -Path $RegKey -Name "ProgramFilesDir" -Value "D:\Program Files" Set-ItemProperty -Path $RegKey -Name "ProgramFilesDir (x86)" -Value 'D:\Program Files (x86) Get-ItemProperty -Path $RegKey -Name "ProgramFilesDir" Get-ItemProperty -Path $RegKey -Name "ProgramFilesDir (x86)" Write-Host "1. Run the SSMS installer and wait for its completion… (Start-Process -Wait)" -ForegroundColor Yellow $process="D:\Software\SSMS-Setup-ENU.exe" $args="/install" Start-Process $process -ArgumentList $args -Wait Write-Host "'nProcess '"$process'" has been executed and is now stopped." -ForegroundColor DarkGreen 

Return value to default installation directory

 $RegKey ="HKLM:\Software\Microsoft\Windows\CurrentVersion" Set-ItemProperty -Path $RegKey -Name "ProgramFilesDir" -Value "C:\Program Files" Set-ItemProperty -Path $RegKey -Name "ProgramFilesDir (x86)" -Value 'C:\Program Files (x86) Get-ItemProperty -Path $RegKey -Name "ProgramFilesDir" Get-ItemProperty -Path $RegKey -Name "ProgramFilesDir (x86)" 

update the location of the Start menu icons to the updated location of the SSMS file.

In my case, I had to browse

 C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft SQL Server Tools 17 

Right-click on SSMS and update the target with the new location of the SSMS program files, and you are ready to go. For detailed instructions https://sqlx86.com/2018/06/28/install-ssms-to-a-different-location/

+4
source

I previously gave an answer to this post to do this using powershell by editing registry values.

Since then I have tried different things, and here I am again with a new way to install SQL Server Management Studio from the command line on the path desired by the user.

The steps for this are as follows

  1. Download the latest SSMS from this link.

  2. Press Win + Q to open the search on your computer and type cmd, select "Run as administrator" in the right pane.

  3. Browse the newly loaded SSMS media from the URL in step 1, in my case it was in D: \ Software
  4. Use the command below to install it in another folder. In my case, I install it in D: \ test.

"SSMS-Setup-ENU.exe / Install / quiet / norestart / log D: \ Test \ log.txt SSMSInstallRoot = D: \ test"

And you're done ...

For instructions with a screenshot, visit https://sqlx86.com/2018/12/27/change-the-default-installation-path-for-sql-server-management-studio-using-command-prompt/

+3
source

I followed the Microsoft support instructions https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017

I restored Visual Studio 2015 IsoShell and it worked for me.

0
source

Yes, this is possible starting with SSMS 18.0.

SQL Server Management Studio (SSMS) 18.0 released for sharing

SSMS can be installed in a user folder - it was a long-standing request. Using SSMS 18, you can install SSMS in any folder, and this option is available both from the command line and from the installation user interface.

0
source

Source: https://habr.com/ru/post/1266899/


All Articles