Just happened upon this. I've casually read through some of your previous posts, but am now ready to try this. Is there a list somewhere that says specifically what this whole process removes and what it keeps? I have a few questions about it:
1. I'd like to be able to modify this to keep Media Center, but I'm not sure if deleting the mediacenter line in the dism.bat is enough... or do I need to make other changes as well?
2. I noticed this removes .NET assemblies... Does that mean that .NET applications won't work with this version of Win7?
3. If I want to keep some of the drivers (remove them from the dism.bat), do I also need to delete the lines in the removal.bat that delete certain infs, driverstore files, etc?
Not sure about 1 or 2 as I'm a newbie at this too. But for #3 I commented out the drivers I wanted to keep.
The only difference is that I had to add 2 lines to the batch removal to take ownership of the windows folders/files otherwise I'd get "access is denied" errors.
I'm getting 'access is denied' errors even though I used dead0's method+files with no modifications (and no errors until now). So I added the two commands and ran the batch, ok. Then commit, another round of vLite to make iso. But booting iso in VMware ends in uninformative BSOD.
When setting up the Virtual Machine use the custom option make sure that when it gives you the option to make the Virtual Disk IDE or SCSI, choose IDE. If I left it at SCSI which is the recommended setting, it would BSOD at the first boot after install.
Also, those two lines of code I added to the top of the batch removal file in order to take ownership causes problems after installing Windows. Basically taking ownership of the files makes the account on your current Windows install be the owner. That's great for deleting the files, but that account won't exist when you install windows from the same files, so things like Event Viewer don't work (log file directories have the wrong ownership on them and therefore can't be accessed) and dlls don't get properly registered. There's probably a whole bunch of more problems, but this is just what I've seen so far.
To fix the issue I added the following lines to the bottom of the batch removal script.
icacls windows /T /Q /C /RESET
subinacl /subdirectories windows "/setowner=NT SERVICE\TrustedInstaller"
subinacl /subdirectories windows\* "/setowner=NT SERVICE\TrustedInstaller"
The first line will reset all the permissions to default. The second two lines make the folders and files under the windows directory owned by TrustedInstaller. This still isn't quite right as not all the folders should be owned by TrustedInstaller, but since the permissions are reset, administrator access on all the files should still make things work right. Event Viewer did work out of the box anyway.
subinacl isn't included with windows. You'll need to download it from: http://www.microsoft...&displaylang=en
Either install it to the system32 directory or copy the subinacl.exe file from the default install directory (somewhere in program files) and copy it into system32 folder or the last two commands won't work when it's reached in the batch file.
There's probably a better way to go about this, but this way works for me so I'm sticking with it.EDIT: After more testing this solution ended up in much different problems. Specifically BSODs when installing Microsoft default hardware drivers.
Edited by dark79, 19 April 2011 - 05:41 AM.