Answer the question
In order to leave comments, you need to log in
How to solve the problem with the system?
Today, trying to solve the problem associated with the fact that I could not choose the path (location) to save Microsoft SQL Server Management Studio 18. He automatically wanted to install it for me where the application used to be (on the D drive). On the Internet, I saw a solution where you had to enter a command in PowerShell to update the default installation directory value:
$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
Answer the question
In order to leave comments, you need to log in
Change paths back to default
$RegKey =”HKLM:\Software\Microsoft\Windows\CurrentVersion”
Set-ItemProperty -Path $RegKey -Name “ProgramFilesDir” -Value “С:\Program Files”
Set-ItemProperty -Path $RegKey -Name “ProgramFilesDir (x86)” -Value ‘С:\Program Files (x86)’
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question