Thank you all very very much, I was able to sort this all out eventually. And my outcome: Yes, it's possible to change the default User and Program Files directories and still have a working system that can update.
It just took an obscene amount of trial and error..
I figured out the reg file command line problem - it needed parenthetical enclosure to run in the directory I was testing from (the desktop).
regedit.exe /s "%userprofile%\desktop\myreg.reg"
Worked great. The reg file itself needed tweaking - here's the finished product on that:
Windows Registry Editor Version 5.00
"CommonFilesDir"="D:\\Program Files\\Common Files"
"CommonFilesDir (x86)"="D:\\Program Files (x86)\\Common Files"
"CommonW6432Dir"="D:\\Program Files\\Common Files"
"ProgramFilesDir (x86)"="D:\\Program Files (x86)"
I created a Windows 7 x64 Repair CD (it's the equivalent of Recovery Console for XP I guess), restarted and used that to get into the command line. Ran this batch file based on the reading you guys provided:
robocopy "C:\Users" "D:\Users" /mir /xj /copyall
robocopy "C:\Program Files" "D:\Program Files" /mir /xj /copyall
robocopy "C:\Program Files (x86)" "D:\Program Files (x86)" /mir /xj /copyall
echo File Copy Complete. Please Restart.
Rebooted. Created new Admin user and deleted the old one (to avoid profile corruption from the move). Tested painstakingly for all the things that had been breaking in my previous attempts - like all shortcuts disappearing, Windows Search not returning any results or crashing, Internet Explorer not loading. and pretty much every app on the system crashing. All of that seems fixed (for now). Needs more testing.
Installed Windows 7 x64 Service Pack 1 RTM without a hitch. Installed Microsoft Security Essentials and updated it without a hitch. Ran Windows Update and updates installed without a hitch.
Installed Internet Explorer 9 x64 Release Candidate - Internet Explorer stopped working (would momentarily flash on screen when loaded, then vanish - known issue). Had to revert to IE8.
It looks like everything (except IE9 RC) will install and update perfectly. Since the guy I'm preparing this for is sane enough to use Firefox anyway, I don't think he'll mind
Picture: Shows Windows Update success, Service Pack 1, open browser, updated MSE, and my customized registry. That's a whole lotta Microsoft crammed in 1 picture lol.
*Forgot to mention, Mr Hoov, you asked what I was trying to accomplish with all this. In my friend's instance, he'll be running his OS from a solid state drive. In addition to disabling indexing and moving the paging file, I wanted to move the Users and Program Files folders for two reasons:
To reduce writes on the SSD.
To make it easier to clone the drive, with a smaller image, that's faster and more convenient to restore in case anything goes wrong, or just for the sake of maintenance. He'll be using CloneZilla, and he can make an image that fits onto a single layer DVD, and will restore in about 15 mins. Not too shabby I'd say.
Thanks again guys, couldn't have done it without you!