Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Program Files default location in Windows 7

Folks,

When I get a new PC, I always first partition my disk into C, D and E - then install Windows on C, other software on D, and use E for my own work. To make my installs easier, I first change the registry location of ProgramFilesDir (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir) to "D:\Program Files". Once I do this, all new installations go to D:\Program Files. Life was good.

Now I have Windows 7. I see that the Registry includes all these entries now...

CommonFilesDir
CommonFilesDir (x86)
CommonW6432Dir
ProgramFilesDir
ProgramFilesDir (x86)

By the time Windows 7 was installed, the two "CommonFiles" directories already had stuff installed. I decided to leave these untouched. The rest I changed to their D-drive equivalents.

So two issues...

First, new software installs STILL want to go to C:\Program Files. I always have to change the "C" to a "D" - which I've never had to do before. (Yes, I've rebooted plenty since making the registry change.)

Second, I'm finding that Visual Studio 2010 seems especially confused by this. I have installed .NET 4.0, and even tried repairing it, but VS 2010 insists I don't have 4.0 installed. (I've heard that others have this trouble, too, and VS 2010 seems to really want to be on the C-drive.)

Any help, dear friends, with either issue?

like image 972
TomK Avatar asked Apr 04 '11 17:04

TomK


1 Answers

I suggest you do not change the reg to point to new drive for program files. Microsoft hard code many things to expect c:\program files and without this set=up all hell breaks loose. This especially true for updates etc.

See http://support.microsoft.com/kb/933700

MS does not support changing location of program files!

The reality is we just have to expicitly set "d" every time we go to install something!

like image 151
user859798 Avatar answered Oct 13 '22 00:10

user859798