XP: Change Default Installation Directory

Contributor Icon Contributed by AlexTheBeast Date Icon November 30, 2003  
Tag Icon Tagged: Windows

This recipe will change the default location that 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:
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.

Previous recipe | Next recipe |
 
  • trev
    I just did this on my computer and think it is great! (XP Pro) However, Outlook Express will no longer work unless I change it back. What can I do?
  • New guy jet
    I can only think of one solution. Don't use the dodgy "Outlook Express" Plain "Outook" that comes with office is a little bit better.
  • EWITHAY
    "navigate to " . . . perhaps you could tell me how to do that. i cannot "navigate to " cause i have no idea where to start. thanks
  • AlexTheBeast
    Navigate inside the registry editor...

    Start -> run -> type regedit

    You are dealing with the registry here. Backup, save restore points, etc.... before playing with the registry.
  • BERT02
    how do u put your user to the otehr drive?
  • Debbie
    I tried this (I changed the default to C: not D:) , but it is still won't install my programs on c: because it says I don't have enough disk space. I do on c:, not on D:. How do I have it check the c: drive for the disk space requirements?
  • Brahmadomtao
    Debbie, I think -no insult here- that this is a bit too technical for you to start delving into registry settings.

    In the meantime,

    Left click "my computer", right click on whatever hard drive you have a question about, scroll down to "properties" on it and there most likely will be an image of what looks like a #3D circle, the blue part is the used up space, the pink is what is free still; both are represented visually and in bytes or megabytes or gigabytes (GB). If there is NO pink or VERY LITTLE in comparrison you need a bigger hard drive and FAST. Regardless, hit that button that says "Disk Cleanup" and once it finishes it's looking for mostly totally useless things to get rid of, select them all and have it clean them off your hard drive. Then at the top of that SAME WINDOW, hit the "TOOLS" tab and select the "defrag now" button. IN win2k and older it will just start right up, in XP it will pop open another window much like the "my computer" window, with that drive already selected. Just click the "defragment" button on the bottom of that window (in XP). Repeat this process for each and every drive.
    might take a while if you haven't done it.

    Whe you finish that go into "start" (Bottom left corner of your screen), programs/accessories/systemtools/scheduled tasks (each foward slash represents going "Deeper" into a file structure or "browsing" to a new place inside that other place) and set up a new task for disk cleanup and defragmentation for all drives once a week when you are pretty sure you won't be working on the computer. Make sure you turn off your screen saver as well for when that event is scheduled as sometimes (not sure if they fixed that in XP) it will cause the event to NOT happen!

    When you are done with that you're well on your way to starting to understand some crucial maintenance issues. If there is more problems post again but do NOT tinker with your registry unless you understand what you are doing, EVEN if you back it up. I hope I am not being condescending or patronizing here, just worried you're in over your head and gonna mess up your operating system reading too technical forums where a lot of critical information is excluded 8O because people here have a certain degree and proficiancy already and know how to do the more basic advanced tasks!
    8)
  • Yan
    thank you very much, your post was very helpless, thanks a lot!!
  • Anonymous
    There is no "ProgramFilesDir" in my registry.
  • Sri
    how to retain c:Program Files and add d:Program Files also in the programfiles dir. do you have to change the programfiles path also ?
    will the addition of drive rather than changing the drive allow the oqtlook express?
  • Anonymous
    del programfilesdir in the regedit. create new key with the same name. but use multi string value. add the new directory example d:Program Files. dont del the c:Program Files where system files are stored. now you can store software in a seperate dir also run outlook express. i hope.
  • Owl
    How change all program paths for my new default installation directory??<font color="red"></font> :?
  • KJ
    Been looking for this! thanks!
  • Owl
    Is there programs for change paths in wxp registry? :?: <font color="red"></font><font color="red"></font>
  • Eddie
    well, i know a program that can modify registry paths that point to the old default installation directory, and replace them for new paths that point to the current default installation directory.
    It is Registrar Lite, a freeware that make search and replace:

    http://www.resplendence.com/registry/reglite.htm

    <img src="http://imagecache2.allposters.com/images/151/HOT-005.jpg"></img>
  • Anonymous
    What does ProgramFilesPath do? The default is %ProgramFiles%. Is it okay to to set ProgramFilesDir to a folder that isn't "Program Files" or does ProgramFilesPath have to be changed?
  • Anonymous
    Hello

    When ever I try to install anything the windows installer tries to put it in "i" drive. This would probly be good if I had an i drive. I followed the path given and this does not seem to be where the drive letter has been changed.

    Is there any other place this could be changed?

    Thx Sno
  • Anonymous
    Is this change supported by MS ?
  • Anonymous
    Is this change supported by MS ?
  • nagaraj
    Nice to know
  • max
    thank you thank you thank you
  • Tom
    It always says that there was an error when modifying it. Could this have to do with administrative privileges?
blog comments powered by Disqus