A few months ago I got my computer, and instead of sticking with the preinstalled Windows 7 Home Premium and OEM stuff I decided I want a clean install from a DreamSpark disc. At the time I also wanted to install Ubuntu, but because it's my only computer, I wanted to have something comfortable to use while adding in Ubuntu later. When I decided to install Ubuntu, I first backed up my existing Windows installation with Paragon Backup & Recovery 10, then I proceeded to install Ubunutu. I ended up having to repartition because I wanted to keep the recovery partition as-is, so I added an extended partition into the first primary partition, wiping out the installation. I restored from my backup after Ubuntu was installed and rejigged the bootloader.
Shortly after that I noticed Windows Installer wouldn't install programs correctly, and noticed that the permission of every single file and directory had been set to Everyone/Full Control, and none had any special permissions for SYSTEM or Administrators or Users. So I did what I can and manually applied some permissions from another Windows 7 system. Things worked generally well after that. Last week, I was looking at the permissions again, and realized having the Everyone permission on everything pretty much defeats the purpose of having permissions, and I removed it from places that shouldn't have them (like the Windows folder, Program Files, parts of Users). Unfortunately, it seems now it borked a few system services. Windows Installer stopped working again, Windows Update fails to apply updates, and the Event Log service disappeared from the Services console.
What I'd like is to programatically overwrite the permissions on my hard drive with permissions from a stock installation. I have a Windows 8 VM ready, and can make a Windows 7 VM if necessary. The only problem is how to apply the permissions. A search around yields a "Copy-Acl" cmdlet, and I think it might work, but I haven't been able to mount the VM disk. I would like to avoid clean reinstallation if possible because backups would take forever, and TBH I don't have a big enough drive (I've got 200GB of files, and a lot of loose ones at that). What options do I have for fixing the ACL, and if cloning from existing installation is acceptable, how do I mount the virtual disk and proceed with copying over the ACL?