Program Files is our next victim

but we have a few caveats. In all my attempts over the years, I've not been able to get Microsoft Office to install anywhere other than C:\Program Files. Windows Defender and WindowsApps are also highly convoluted installations, WindowsApps are UWP, and they have some deeply buried registry values that are beyond the normal scope of Registry Toolkit. Those could probably be scripted, but they are just too numerous for me to make that effort, so I've elected to just leave them where they are in C:\Program Files for the sake of simplicity.

Mount your full drive image again, and get ready to use robocopy under Process Hacker Run as trusted installer. The command line uses the same switches, but now there are many more excluded directories. It's easier to list the directories you want to copy:

Program Files

Program Files (x86)

ProgramData

VirtualStore

In your robocopy command line, include the same switches used for Users, exclude (/xd) all other directories listed in your mounted drive image. Remember to put quotes around any directory that has a space in its name, else robocopy will abort. It will make it easier if you open a Command Prompt, navigate to C:\> and type

dir > followed by the path to your desktop and \Directories.txt

That will give you a text list of all the directories on C: and make it easy to use cut/paste into an open notepad to create your robocopy command line. Once you have your robocopy command line complete and double-checked for errors, copy it to the clipboard, use Process Hacker Run as trusted installer to open cmd.exe, then paste your robocopy command line in the Command window and hit Enter. Once it finishes successfully, unmount your drive image and make a fresh drive image of your new Program Files partition.

For the registry editing, it's the same as it was for Users, with some additional steps. Use Process Hacker Run as trusted installer to open Registry Toolkit, and replace every instance of C:\Program Files with U:\Program Files (not U:, but the drive letter you are using for your Program Files partition). This will also take care of the (x86) folder. The next step is to undo the changes to WindowsApps. Now replace every instance of U:\Program Files\WindowsApps with C:\Program Files\WindowsApps.

Now repeat the same procedure for Microsoft Office and Windows Defender that you used for WindowsApps, both in Program Files and Program Files (x86). In other words, get them pointing to C: again. Once you've finished the registry editing, reboot. Use your PC normally for a bit, open and close programs, and satisfy yourself that Windows is operating normally. Some shortcuts and Start Menu items will still point to their original location. If a program fails to open, check the properties of the shortcut/menu item for the path, edit accordingly, and retry. Rename some of the folders in the C:\Program Files folder (add old to the name) and see if they will open. If you notice any glitches, you can open regedit.exe under Process Hacker Run as trusted installer, look for any rogue C:\Program Files leftovers, edit any that you find to point to your new Program Files partition, then reboot and check again. Satisfy yourself that everything is alright before you proceed to the next step.

The Registry edits

for Program Files are a bit convoluted in that we must change all of them to point to the new Program Files partition, then we have to re-point others right back to C:\Program Files.