Change default installation drive?

2ninup

Distinguished
Jan 25, 2014
89
0
18,640
Hi all,

Is there a way to change the default drive programs try to install to? So for example, normally a 64 bit installation of let's say Photoshop will want to install to C:\Program Files\Adobe\Photoshop. Is there a way that the default will come up as E:\Program Files\Adobe\Photoshop. Maybe a registry fix? I want to do this because my C: is an SSD with limited space so all programs go to my E: drive..

Thanks for any and all replies,
 
Solution
Yes. You need to edit a couple of registry keys from C:\Program Files and C:\Program Files (X86) -- you will find them under HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/Current Version and they are the two keys called ProgramFilesDir and ProgramFilesDir (x86). Just change them to E:\Program Files and E:\Program Files (x86). To edit the registry use the registry editor that you will find by typing regedit in the start button search box.

RealBeast

Titan
Moderator
Yes. You need to edit a couple of registry keys from C:\Program Files and C:\Program Files (X86) -- you will find them under HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/Current Version and they are the two keys called ProgramFilesDir and ProgramFilesDir (x86). Just change them to E:\Program Files and E:\Program Files (x86). To edit the registry use the registry editor that you will find by typing regedit in the start button search box.

 
Solution

2ninup

Distinguished
Jan 25, 2014
89
0
18,640
@RealBeast

Thanks so much, I figured there was a registry edit for this but didn't know how. There is a line in the same place called "ProgramW6432Dir" with a setting of "C:\Program Files" Should I set that to E: also?
 

USAFRet

Titan
Moderator
Personally, I prefer to choose which ones go where, instead of forcing to be 'other than C'.

How large is the SSD?
Applications, incl Photoshop, don't really take up that much space. A 120GB SSD for instance, can hold quite a few applications.
And many things you DO want on the SSD.

What really takes up valuable space is your Documents and Downloads. And that is REALLY easy to change the location for.
See these:
Win 7 & 8: http://www.tomshardware.com/faq/id-1834397/ssd-redirecting-static-files.html
Win 8.1: http://www.tomshardware.com/faq/id-2024314/windows-redirecting-folders-drives.html

 

2ninup

Distinguished
Jan 25, 2014
89
0
18,640


Hi,
I followed your instruction exactly and when I first tried the registry edit and attempted to install a small Gigabyte program from the installation CD it did default to E:\Program Files(86)\Gigabyte dir, but on subsequent installations the installation dir defaults to C:\ again. This was under Win 7 so I also tried it under Win 8.1 but got the same C:\ default. Any idea why it worked and then stopped? I rechecked the registry and it still has the edits I put in for E:\.....

Thanks
2
 

2ninup

Distinguished
Jan 25, 2014
89
0
18,640

Hi, thanks for your reply
I'm using a 500GB Samsung EVO partitioned into 2-233GB partitions for dual boot. I know that probably 90% of my installations will got to the E drive, especially downloads, documents, music, photos etc. I just figured that in time with things like iTunes dropping files on C anyway and Photoshop running so great on the SSD it will fill up eventually. I guess it just comes down to my laziness;-)
Thanks
2
 

RealBeast

Titan
Moderator
Did you change the key for both keys: ProgramFilesDir and ProgramFilesDir (x86) and do they both remain set to the new location?

Note that on some installers, the specific install location is changeable in the install and will have a different default address than Windows uses and is just like choosing a different location so you will have to watch for those. The default setting, even if E:, can be overcome by that manual setting.
 

2ninup

Distinguished
Jan 25, 2014
89
0
18,640


Yes, I did change both keys but still out of maybe 7 installs I have tried not one has come up again with the E: drive as the default, always C:. Is there an environment variable that could be set too? BTW I'm doing this on Win 7 although I saw the registry key was the same on Win 8.1.
 

RealBeast

Titan
Moderator
There is a second step needed for x64 that I forgot to add. Once the regular regedit is run, like you have done, you need to do the second one. In the Start button search window paste: %systemroot%\sysWOW64\regedit and run it. Then change the same two keys ProgramFilesDir and ProgramFilesDir (x86) by changing the registry key value to E from C.

Note that this is not recommended by MS as it can cause issues with updates to their programs. And I agree with USAFRet that better solution is to move documents and downloads since having them on a HDD will impact performance a lot less than putting your programs there.
 

2ninup

Distinguished
Jan 25, 2014
89
0
18,640


Ok, I changed 2 entries but this time both were for C:\Program Files (x86)
Here is a pic after I changed them:
registry.jpg


Is that the way they are supposed to be?

Thanks for your help
2



Which I changed to E:. Is this the way it is supposed to be?

 

2ninup

Distinguished
Jan 25, 2014
89
0
18,640


Hi,
I just looked at this again and when I paste and run the link it just takes me to the registry editor that happened to open up on the last place I was which was the original link you sent me. Somehow my entries got screwed up so I am fixing them now but is that where you wanted me to go? I can't find another entry for ProgramFilesDir in the registry. Now it looks like this:
registry2.jpg



 

2ninup

Distinguished
Jan 25, 2014
89
0
18,640


Should the top 2 entries in the .jpg's I sent last time both point to 32 bit path"program files (x86)"? Or should the first one point to 64 bit "Program Files" It does all seem to be working now though.
 

2ninup

Distinguished
Jan 25, 2014
89
0
18,640


Hi,
I'm still getting errors on installations. I know you said the top 2 entries were correct but in Win 8.1 they point to the 64 bit and 32 bit program files directories respectively and not like this both pointing to x86.. Would you look one more time and ease my mind that they top 2 entries should both be pointing to Program Files (x86).

Thanks

registry2.jpg
 

RealBeast

Titan
Moderator
The safest way is to *only* change the drive letter needs to be changed for the two keys using the 32 bit editor by typing regedit and then using 64 bit registry editor for the same keys that you call up by typing %systemroot%\syswow64\regedit into the start button search box to get the 64 bit editor. The keys that need to be changed are ProgramFilesDir and ProgramFilesDir (x86). Then restart your computer.


HERE is a guide to the method that I use, although I do NOT change any other keys, which can make your system unstable. If you mess something up use safe mode to change back to the original keys that you should have backed up in case of problems.

To understand what you are actually doing, all of this just changes four registry keys -- two each (ProgramFilesDir and ProgramFilesDir (x86)) in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion and
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion

Note that you can run into issues if you are installing a new program that is actually an update to one already installed on the C drive after making this change. I find it best to uninstall the original program first.