How can I change the default program installation directory in Windows 7?

Solution 1:

There is no way to set the default program installation folder in Windows other than that registry change. If you're on a 64-bit system, then you should follow the instructions given here.

After all, Microsoft does not support changing the location of the Program Files folder by modifying the ProgramFilesDir registry value.

Microsoft does not support changing the location of the Program Files folder by modifying the ProgramFilesDir registry value. If you change the location of the Program Files folder, you may experience problems with some Microsoft programs or with some software updates.

Solution 2:

From Raymond Chen:

Why can't I move the Program Files directory via the unattend file?

The unattend file lets you change some Windows configuration settings that cannot be changed after Setup is complete. But one of the things you can't change is the location of the Program Files directory. Many people wish they could relocate their Program Files directory to another drive in order to relieve disk space pressure on the system partition. Why won't Windows let them do this?

Windows Setup takes advantage of hard links. A large percentage of the files installed by Windows are hard-linked to copies in the C:\Windows\WinSxS directory.

But one of the limitations of hard links is that they cannot span volumes. Some of the hard links out of the WinSxS directory point into places like C:\Program Files\Windows NT\Accessories\wordpad.exe, and this in turn requires that the Program Files directory be on the same volume as your Windows directory.

Sorry for the inconvenience.

tl;dr: Windows cannot run with Program Files on any other drive

dm;hs