N
N
Nikolai Kuznetsov2021-10-11 17:49:55
PowerShell
Nikolai Kuznetsov, 2021-10-11 17:49:55

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

After that, I managed to install Microsoft SQL Server Management Studio 18, but I had a complete pipets with the system. Firstly, almost all shortcuts on the desktop did not open applications, because for some reason their path was on the D drive for everyone. Secondly, I had to delete a couple of applications, since they completely stopped opening after entering this command (OBS , Geforce Experience, etc.), and last of all (apparently they decided to finish me off) Management Studio itself gave me an error "The application could not be started because its parallel configuration is incorrect - how to fix it" . For 4 hours I tried to restore everything. For some reason, even the rollback of the system did not help, and everything remained the same for me. I don't understand anything anymore. Everything that is possible, everything that was shown on the Internet, I tried to do.
61644eff3d959093252024.png
I have already tried everything, even the system rollback does not help. I decided to install the program, but now I can’t open a damn thing and I constantly see errors ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxKozlov, 2021-10-11
@MaxKozlov

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)’

A lot of things are tied to these paths in the system, and changing them is like hitting the head with a sledgehammer.
And the problem with installing Management studio could certainly be solved with command line parameters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question