Changing Program Files default location in Windows 7

32,553

Solution 1

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!

Solution 2

How about using GimmiLFactorY suggestion and then adding a hard link to the program folders, or rather, use a directory junction. The following article shows how you can do this easily:

http://ipggi.wordpress.com/2009/09/07/windows-file-junctions-symbolic-links-and-hard-links/

Solution 3

Here is what I came up with, I haven't tried it as I have not ordered my SSD, but everyone should try this. Two easy Parts, Just a few steps each.

Part 1

A)

Start > Control Panel > System > Advanced System Options(Win XP?/Vista/7/8)

Pop-Up window > Go to: Advanced Tab, at Top > Environment Variables, at bottom right.

Bottom window area Marked: System Path > New Button

Variable Name: CSIDL_PROGRAM_FILES

Variable Value: X:\Program Files\

Replacing X with your drive letter, and remembering to use \ back slash, not forward slash /

This is the end if you have a simple 32-Bit(x86 platformed) PC.

For part B, This is where we 64-Bit platformed PC-goers have to do this additional step. for x64 the variable acts as the standard still program structure, but WoW64 compliant via registry separator. So what we have to do is just an additional variable, with a slight change of the Name for each new values.

B)

Bottom window area Marked: System Path > New Button

Variable Name: CSIDL_PROGRAM_FILESX86

Variable Value: X:\Program Files (x86)\

This sets our 32-Bit Platformed programs which still exist in our new environment, as most programs do not need to use to this day more threads, and they are built that way.

Part 2

The standard changing your registry keys for default program files installs.

Start > Run > enter "regedit" Hit Enter. Navigate on left tree to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

change two values that appear on right frame, as we did before. Only one is needed for x86 Platform, If you do not own 64-bit, You need not change the second value.

A)

Variable Name: ProgramFilesDir

Variable Value: X:\Program Files

B) (If you have 64-Bit windows)

Variable Name: ProgramFilesDir (x86)

Variable Value: X:\Program Files (x86)

Side note, Notice this variable set does not have an additional backwards "\" on it, as it can't have in it in this particular section, I do not know why as of yet ahahahah, but I would just follow prior formatting of how it was.

Share:
32,553

Related videos on Youtube

TomK
Author by

TomK

At various times a Senior Developer, system architect, behavioral economics design consultant, healthcare product manager, and heaven knows what else. I sometimes work from the loft of our barn behind my house, where the wood stove keeps me cozy through the long winters. My kids are nifty, as is my wife. The dog I tolerate.

Updated on January 03, 2020

Comments

  • TomK
    TomK over 4 years

    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?

    • beatgammit
      beatgammit about 13 years
      This may be a better question for SuperUser.com

Related