XP: Change Default Installation Directory
This recipe will change the default location where Windows installs programs.
I have always been a two-hard-drive kinda guy. I like to keep my main drive running mean and lean, with mainly just the OS running. On my second drive, I like to install the majority of my programs. However, Windows always wants to install programs to “c:\program files” and changing it everytime can be a pain.
After you back up your registry, this is how you can change this default location.
1. Navigate to the following:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
2. Find ProgramFilesDir whose default should be C:\Program Files
3. Change this to whatever directory you wish. I changed it to D:\Program Files for example.
Remember you have to reboot for your changes to show.








nagaraj said on January 12, 2009
Nice to know
max said on February 3, 2009
thank you thank you thank you
Tom said on May 11, 2009
It always says that there was an error when modifying it. Could this have to do with administrative privileges?
Anonymous said on July 19, 2009
Very Nice Thankyou, was looking for a while but your instructions are simple and easy to follow, Good Job.
Joseph Patrick Durand said on July 31, 2009
Thnx! this was EXACTLY what I was looking for!
Anonymous said on August 6, 2009
What if you want it to default to the current user’s profile? Would this work?
%USERPROFILE%Program Files
Anonymous said on September 28, 2009
Does this mean I can put some programs on a memory stick – my Dell Mini 9 has almost o room left on it’s tiny 8GB SSD ! It would be great to have some other programs available if I could somehow install them onto the memory card yet still get their ICON to show on desktop or in the PROGRAMS list.
Anonymous said on October 13, 2009
what do you do w/ the ProgramFilesPath that formerly listed %c:program files% after changing the above?
MG
Anonymous said on December 31, 2009
Thank you very much!!! This is very useful to me.
Name said on January 23, 2010
I tried this on windows 7 in my case it works….sorta because whenever i install something new it installs it to my “D:” drive in the program files there but the short cuts in the start menu still revert to the C: drive for whatever reason….I’m looking into it but i’m not sure where to start… any help would be appreciated greatly. NOTE : Error “C:Program FilesProgramNameHereProgram.exe
The specified path does not exist.
Check path name, and then try again”
I have manually reset the shortcut in the start menu and then “tried again” to have it work but doing this for every program is a hassle and unexceptionable in the long run once again any help would be great.
Name said on January 23, 2010
Disregard my last comment…I forgot to reboot after edit the registry. All fine after a reboot. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Cedo said on February 11, 2010
http://support.microsoft.com/kb/933700
Tells you MS doesn’t support the change for a few reasons that are listed in the article. However, it also tells you how to do it. If you don’t mind being experimental, I say give it a shot.
Anonymous said on February 24, 2010
my problem is probably simple to fix but, when i was about to install something, i accidently click ‘open with’ then picked ‘winrar’ is there away to fix this?
Anonymous said on February 24, 2010
meaning, when everything i download, always has that winrar logo, and won’t install properly
Jack Richard said on April 6, 2010
Thank you very much.
Anonymous said on April 10, 2010
Hello, to anybody that looks at this and can possibly solve my problem. I realize that this changes the default installation directory for programs you download off the internet. What I desperately and dearly need to know is how to change it for a CD. If anyone has the answer, I would be very greatful if you could tell me. Thank you.
fatemeh said on May 20, 2010
Thank you so much ! It helped me a lot !!!
lewis said on May 22, 2010
hey this would fix all my problems but i tried to do it i cant find any file called programfiledr in program files in my c: drive , i use windows xp but i cant find that file , is there somewere else it could be ?
Benallott said on August 19, 2010
keep in mind this will move all shortcuts of already installed programs
so go to (original location):Program Files and copy all the (New Location):(Folder Name)
e.g. (old) C:Program Files -> D:Me App Files
Josejijo172 said on August 26, 2010
thkzz man u r my hero
Christa said on September 28, 2010
Just wondering if the two hard drive idea works with a hard drive that’s partitioned or if it has to be two separate pieces of hardware. I’m thinking about doing this but if it only keeps things faster when it’s two separate pieces of hardware, then I can’t do it right now.
Phil said on March 19, 2011
Great information. Thank you.
adam said on May 21, 2011
I got this working on Windows 7 64 bit. Here’s what I did:
In addition to the registry keys in HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion you also need to change the ones in HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersion.
Then, you need to copy all the files in c:Program files (x86) and c:program files to where ever your new locations are. Then don’t delete the original directories, since not all programs are smart enough to make the switch.
Obviously, this works best on a fresh install where the program file directories are only a few hundred megabytes.
Any (well, most) new programs you install will figure out that your new location is the default program files directory.
shruthi said on October 6, 2011
hey, i did al the above. But when i changed the drive to other drive n restart the system n tried to install the softwares . . Its showing the path cannot be found n the regedit also not opening. Its showing windows cannot find the regedit. . Wat to do ?