Changing the Program Files and Common Files paths (Updated)
Don't try this on Windows Vista. Windows updates that affect files in these folders will fail every time. Welcome to Microsoft's "Do things our way only" vision of wanting to cater for everyones' needs.
ProgramFilesDir (String): D:\Apps CommonFilesDir (String): D:\Apps\Common Files
...can result in way too much inconsistency in how applications handle the modified settings. Many applications decide that ProgramFilesDir is always on the %SYSTEMDRIVE%, or assume that CommonFilesDir is located in ProgramFilesDir (I tried leaving CommonFilesDir on C drive and having ProgramFilesDir point to a new location).
To summarise my new recommendation, on a new installation of Windows NT4/2000/XP, copy the contents of C:\Program Files to (for example) D:\Apps (I would also recommend making a backup of C:\Program Files at this point), then in 'command prompt safe mode', delete "C:\Program Files", re-create the folder then make it an NTFS junction, pointing at the new location. Leave the above registry settings alone, and let Windows and 3rd party applications believe that these folders are in their normal places.
I've used this tactic quite a few times on live systems (ie. ones that people are using already with all their apps installed). The most common workaround I need to do is uninstalling Adobe Reader, because even in safe modes, certain files are locked.
The more detailed version:
You'll need your favourite file copying program (I use RoboCopy), and sysinternals.com's "JUNCTION" file utility, and I would recommend trying this on a completely new installation of Windows XP (though theoretically, if there aren't any additional services that are starting even in safe mode, this should work then too).
When you start Windows for the first time, get up a command prompt and copy the contents of "C:\Program Files" to "D:\Apps". In RoboCopy, I do this by:
ROBOCOPY "C:\Program Files" "D:\Apps" /MIR /R:0 (no waiting on file access failures, no retries either
Modified: 31/10/2008, Mike Moratz-Coppins.
Tested on: WinNT4, Win2k, WinXP.