Registry - Default install path problem

andrewboast

Prominent
Dec 9, 2017
2
0
510
I recently followed the advice in this thread to alter the default path to redirect the default install path for new programs.

http://www.tomshardware.co.uk/answers/id-1792156/secondary-harddrive-question.html

One exception I did not change “ProgramFilesPath” as its key was “%ProgramFiles%” and I presumed this was picking up the default from one of the keys I had changed and therefore would be self-correcting.
I did not back up the registry before hand, given the outcome I doubt this would have made much difference.

I first tried to install a new program and it was still coming up with the old value of c:\ Etc, so I then restarted machine.
Now when I try and run many of the system files Regedit Etc. I get an error massage saying:
Windows cannot find:
C:\Windows\Regedit.exe” Make sure you typed the name correctly.

Also when I try and use many of the desktop or Taskbar shortcuts their properties have been changed to reflect the new entry I had put in the Registry “E:\Program Files\App name” If I manually edit the shortcuts of go directly to executable the installed programs seem to work.

Here’s the really weird bit I have downloaded a 3rd party registry editor when I run it the 3 key entries I had changed to e:\ are back to showing c:\

If I right click and select run as administrator the 3rd party reg editor will not run (I presume other progs would also be the same.

So cannot run system restore.

I have gone to another machine and exported the small section of the Reg I wish to change and tried importing that but that won’t run either.

Given that some apps just work but many of the system executables will not I am unsure of what to try next, any assistance or thoughts would be appreciated.

One other point any changes made via the 3rd party editor are not being saved because I cannot run it as the administrator, even though my user account is set to administrator.

Windows 7
 
Solution
Right.
I am not aware of any procedure to 'fix' this, other than a reinstall.
You can't get to the thing you need to change.

A full C drive image done before you did that would have allowed full recovery.

To reiterate all the other comments in that thread, that Registry change is NOT what you want to do, nor is it a safe procedure. As you have found.

USAFRet

Titan
Moderator
You used the info from the first Reply in that thread?
Bad move.

Editing the Reg is NOT the way to do what you seek.
If you read through that thread, everyone else (including myself) strongly recommend not doing that.

I do not believe there is a way to "fix" the situation, because you can't get into the tool you need to actually "fix".
The only "fix" i've seen is an actual OS reinstall.
 

andrewboast

Prominent
Dec 9, 2017
2
0
510


Thanks for your response, I followed below with the one exception mentioned in first post.



P.S: Back up your registry before doing this... Do so by opening regedit (mentionned below) and clicking File > Export > Save. That will save you in case of failiure :)

Open regedit (Start > Run > "regedit"). Then find "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion". Now look in the right pane. Change "ProgramFilesDir", "ProgramFilesPath", "ProgramW6432Dir" and "ProgramFilesDir (x86)". If your secondary drive letter is D:\, then change them to "D:\Program Files", "D:\Program Files", "D:\Program Files" and "D:\Program Files (x86)", in that order that I just mentionned. You should be good to go from here.

 

USAFRet

Titan
Moderator
Right.
I am not aware of any procedure to 'fix' this, other than a reinstall.
You can't get to the thing you need to change.

A full C drive image done before you did that would have allowed full recovery.

To reiterate all the other comments in that thread, that Registry change is NOT what you want to do, nor is it a safe procedure. As you have found.
 
Solution