XP: Change Default Installation Directory

This recipe will change the default location where Windows installs programs.

I utilize two hard drives because I want to keep my main drive running efficiently, with mainly just the OS running. I install the majority of my programs on my second drive.. However, Windows always wants to install programs to “c:\program files” and changing it every time can be time consuming.

After you back up your registry, this is how you can change this default location.

1. Navigate to the following:
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.

The Conversation

Follow the reactions below and share your own thoughts.

26 Responses to “XP: Change Default Installation Directory”

  1. January 12, 2009 at 8:50 am, nagaraj said:

    Nice to know


  2. February 03, 2009 at 10:06 am, max said:

    thank you thank you thank you


  3. May 11, 2009 at 6:55 pm, Tom said:

    It always says that there was an error when modifying it. Could this have to do with administrative privileges?


  4. July 19, 2009 at 5:35 pm, Anonymous said:

    Very Nice Thankyou, was looking for a while but your instructions are simple and easy to follow, Good Job.


  5. July 31, 2009 at 7:15 pm, Joseph Patrick Durand said:

    Thnx! this was EXACTLY what I was looking for!


  6. August 06, 2009 at 6:29 pm, Anonymous said:

    What if you want it to default to the current user’s profile? Would this work?

    %USERPROFILE%Program Files


  7. September 28, 2009 at 2:34 pm, Anonymous said:

    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.


  8. October 13, 2009 at 2:23 am, Anonymous said:

    what do you do w/ the ProgramFilesPath that formerly listed %c:program files% after changing the above?



  9. December 31, 2009 at 4:04 am, Anonymous said:

    Thank you very much!!! This is very useful to me.


  10. January 23, 2010 at 12:16 am, Name said:

    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.


  11. January 23, 2010 at 12:28 am, Name said:

    Disregard my last comment…I forgot to reboot after edit the registry. All fine after a reboot. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


  12. February 11, 2010 at 3:46 am, Cedo said:


    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.


  13. February 24, 2010 at 9:56 pm, Anonymous said:

    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?


    • February 24, 2010 at 9:57 pm, Anonymous said:

      meaning, when everything i download, always has that winrar logo, and won’t install properly


  14. April 06, 2010 at 6:18 pm, Jack Richard said:

    Thank you very much.


  15. April 10, 2010 at 10:51 pm, Anonymous said:

    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.


  16. May 20, 2010 at 6:37 pm, fatemeh said:

    Thank you so much ! It helped me a lot !!!


  17. May 22, 2010 at 8:49 am, lewis said:

    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 ?


  18. August 19, 2010 at 1:46 pm, Benallott said:

    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


  19. August 26, 2010 at 2:35 am, Josejijo172 said:

    thkzz man u r my hero


  20. September 28, 2010 at 11:46 am, Christa said:

    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.


  21. March 19, 2011 at 11:13 pm, Phil said:

    Great information. Thank you.


  22. May 21, 2011 at 10:46 am, adam said:

     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.


  23. October 06, 2011 at 9:41 am, shruthi said:

    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 ?


  24. November 30, 2012 at 3:28 pm, ken said:

    Strange thisng is that when I go in to regedit and then to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

    all that is in there is a key saying default not set


  25. June 08, 2013 at 2:52 am, Dhiraj said:

    Thnxx……this helped even without rebooting


Leave a Reply