I have an SSD as my main Windows drive, with a 640GB 2.5" HDD, partitioned to store programs and user settings, and also to act as backup (it's the only thing I had lying around at the time of building my PC).
The problem is that whenever I install a program, it installs to C:\Program Files [(x86 for the 32 bit programs]\
, although I have changed the environment variables.
This wouldn't normally be an issue, however every installation program points its shortcut to my 640GB HDD.
The root layout of both drives:
To clarify:
- Program files get installed to C:\
- Program shortcuts are always pointed to Z:\, my 640GB HDD
Modifying the relevant environment variables doesn't do anything, I looked at this, but however it only talks about modifying the registry and environment variables, which I have already done so.
I install to the Z:\ drive if the installation program lets me change the installation path, but however the installation programs sometimes don't let me change this.
Is there a way that I can force every program to install to the relevant location on Z:\, but at the same time move any programs currently installed to the new location?
Perhaps I'm missing something here?
My target is to have every program installed on Z:/
, with only the core Windows operating system on C:/
.
Found this program; would it be appropriate to use in my case? I would be able to move the entire Program Files (and its x86 version) to Z:\, without impacting on the performance.*
Best Answer
System folders relocation
Yes, there is. Keep in mind it's not officially supported, and can lead to unwanted side effects:
Also:
If you understand that and want to continue anyway, make sure the destination is NTFS formatted, and that there's sufficient free space. Then follow these steps:
Select the Repair Your Computer option through the advanced boot options you get by pressing the F8 key before Windows starts. If the option is not available, you'll need to boot using a Windows installation disc.
Open the command prompt (also available by pressing Shift+F10), and retrieve the letter associated with the system drive by typing the following command and pressing Enter.
In case it doesn't exists already, create the destination folder. Replace the path below with the correct location.
Copy all the data from the original folder to the new one. Replace
D:
with the letter of system drive you got in step 2, and then verify that all files were copied successfully.Rename the original folder to something different, e.g.
Program Files.old
.Create a directory junction point pointing to the new folder location, adjusting the letters as needed.
Note The command will fail if the folder wasn't renamed, as per step 5.
Repeat steps 3-6 for any other folders you want to relocate. When you're done, restart Windows. Ensure everything is working correctly, then delete the
.old
folders.Further reading