Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Windows 7 Ultimate/Server 2008 R2 Enterprise SP1 Batch Removal

- - - - -

  • Please log in to reply
121 replies to this topic

#51
alvinkhorfire

alvinkhorfire

    Member

  • Member
  • PipPip
  • 104 posts

wim tweak does work with waik for 7 but does take ages for the package removal


Thanks, dead0. I am aware that Install Wim Tweak is for taking ownership of the registry hives in the install.wim. Is it also responsible for taking file ownership of protected file in C:\Windows, so that we can delete them?


How to remove advertisement from MSFN

#52
xpJohnson

xpJohnson

    Junior

  • Member
  • Pip
  • 51 posts
any idea why I cant install bullzip pdf? it complains about not finding a driver just doesnt say which one.

#53
dead0

dead0

    Advanced Member

  • Member
  • PipPipPip
  • 488 posts
  • OS:none specified
  • Country: Country Flag


wim tweak does work with waik for 7 but does take ages for the package removal


Thanks, dead0. I am aware that Install Wim Tweak is for taking ownership of the registry hives in the install.wim. Is it also responsible for taking file ownership of protected file in C:\Windows, so that we can delete them?

i dont think its possible but it might be worthwhile to pm bm wnuku as he/she was the one who made. i have no idea :P

any idea why I cant install bullzip pdf? it complains about not finding a driver just doesnt say which one.

did you keep printer support? you may need that as some pdf programs need printer support to output to pdf such as acrobat.

#54
Hybrid Keyrayder

Hybrid Keyrayder

    Newbie

  • Member
  • 19 posts
Hi dead0. The problem I was having was caused by the removal of the service Distributed Transaction Coordinator (DTC). I kept the service and the x86 install worked flawlessly. However I am still having an error with the x64 install, this one gives me the following:
"The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. To install Windows, click "OK" to restart the computer, and then restart the installation"
Any ideas?

#55
alphaniner

alphaniner
  • Member
  • 4 posts
  • OS:Windows 7 x64
  • Country: Country Flag

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.

Edited by alphaniner, 29 March 2011 - 04:06 PM.


#56
alvinkhorfire

alvinkhorfire

    Member

  • Member
  • PipPip
  • 104 posts

i dont think its possible but it might be worthwhile to pm bm wnuku as he/she was the one who made. i have no idea :P

Thanks for your suggestion. I asked wnuku via PM and the following is wnuku's reply:

hi,
yes, i created install wim tweak some time ago, and purpose of it was to enable removing some components of windows. And simply, only thing that install wim tweak is doing is changing registry entries inside hives in install.wim (sorry for misleading name of tool). Back in 2008, guides about removing components from vista/2008 had instructions how to do all those changes manually, but it was time consuming and could cause many errors when registry has been edited in wrong way. That's why i created this tool - to simplify this process. If you are curious what exactly my tool is doing, there are source codes posted here : http://www.msfn.org/...post&pid=825130 .
Short answer, as far i can remember, install win tweak does not touch file security inside install wim. Hope it helps :)


Well, wnuku did not design the install wim tweak to take over the file ownership of the protected files in the install.wim.

If I execute the batch file without using the install wim tweak prior to that, I can only remove limited numbers of fonts.

However, if I execute the install wim tweak before executing the batch file, I can remove even more fonts. Probably, changing registry entries inside hives in install.wim by install wim tweak may have enabled easier deleting of system-related files, such as fonts. :)

Edited by alvinkhorfire, 30 March 2011 - 02:11 AM.


#57
xpJohnson

xpJohnson

    Junior

  • Member
  • Pip
  • 51 posts


any idea why I cant install bullzip pdf? it complains about not finding a driver just doesnt say which one.

did you keep printer support? you may need that as some pdf programs need printer support to output to pdf such as acrobat.


I left everything the way you had setup. I didn't change any of the settings. Even though this takes up less hard drive space, I'm not sure there is a performance increase so I think I may have to go with the full install because I am needing some of these things and can't get any to work. Thanks for your work though.

#58
dead0

dead0

    Advanced Member

  • Member
  • PipPipPip
  • 488 posts
  • OS:none specified
  • Country: Country Flag



any idea why I cant install bullzip pdf? it complains about not finding a driver just doesnt say which one.

did you keep printer support? you may need that as some pdf programs need printer support to output to pdf such as acrobat.


I left everything the way you had setup. I didn't change any of the settings. Even though this takes up less hard drive space, I'm not sure there is a performance increase so I think I may have to go with the full install because I am needing some of these things and can't get any to work. Thanks for your work though.

i think i found the problem. you need to keep the printer drivers package in the dism stage. similarly if you have trouble installing usb modems, you need to keep the modem drivers package as well:

modem support + Microsoft-Windows-Common-Modem-Drivers-Package~31bf3856ad364e35~amd64~~6.1.7601.17514
printer support + Microsoft-Windows-Printer-Drivers-Package~31bf3856ad364e35~amd64~~6.1.7601.17514
tv tuner support + Microsoft-Windows-Tuner-Drivers-Package~31bf3856ad364e35~amd64~~6.1.7601.17514 (if keeping media center)

ps i also had problems removing the driver packages when using waik2 with the wim tweak

Edited by dead0, 02 April 2011 - 11:01 AM.


#59
Ultimist

Ultimist

    Newbie

  • Member
  • 20 posts
Hi,

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?

Thanks.

Edited by Ultimist, 10 April 2011 - 09:22 PM.


#60
dark79

dark79

    Newbie

  • Member
  • 10 posts

Hi,

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?

Thanks.


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.


#61
alvinkhorfire

alvinkhorfire

    Member

  • Member
  • PipPip
  • 104 posts
If I am not mistaken, we use GImageX to mount the Windows image. Then, we execute the batch removal file, via Command Prompt as Administrator.

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.

After the batch removal file has completed its task, we shall close Command Prompt, and unmount the the image via GImageX. Before we unmount the image, can we delete the subinacl.exe from system32 folder of the mounted folder (C:\s2)? It is only needed to present during the batch removal, and it not needed afterwards, right? I may as well delete it.

#62
dark79

dark79

    Newbie

  • Member
  • 10 posts

If I am not mistaken, we use GImageX to mount the Windows image. Then, we execute the batch removal file, via Command Prompt as Administrator.


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.

After the batch removal file has completed its task, we shall close Command Prompt, and unmount the the image via GImageX. Before we unmount the image, can we delete the subinacl.exe from system32 folder of the mounted folder (C:\s2)? It is only needed to present during the batch removal, and it not needed afterwards, right? I may as well delete it.


I didn't install it to the mounted image. I installed it to the Windows install I was already using to make the image.

Also those extra lines of text didn't work out and I'm going to have to figure something else out. For some reason, some of the files in my System32/drivers folder didn't get admin permissions so I got BSODs when Windows tried to install default hardware (like Bluetooth).

#63
dark79

dark79

    Newbie

  • Member
  • 10 posts
I'm giving up on the batch file. I'll just wait until either RT7Lite is updated to handle SP1 better or another method is found. There are far too many different permissions/ownership to have to change and revert in order to get this working right for me.

Taking ownership and changing all the permissions to include Administrators with full permissions and then changing the owner universally to Administrators would probably work, but you'd just have to be confident the people on your computer with Admin rights won't break something.

EDIT: I'm currently testing with setting Administrators as the Owner of the files instead of Trusted Installer. Seems ok in VMWare. Haven't tested an actual install yet though.

Edited by dark79, 19 April 2011 - 05:40 AM.


#64
TrendMark

TrendMark

    Newbie

  • Member
  • 10 posts
  • OS:Windows 7 x86
  • Country: Country Flag
I also tried to work on a lite job from this file but I recieved "dism error. How can I solve this problem. If anyone knows how to do it, please help me... :(

#65
chlje

chlje

    Newbie

  • Member
  • 26 posts
  • OS:none specified
  • Country: Country Flag
I Wondder to know after running the batch file, will Hotfix and feature-Control panel be broken ? :unsure:

#66
boogerlad

boogerlad

    Junior

  • Member
  • Pip
  • 52 posts
why are there number signs in front of some delete commands? Are those comments to some experimental things that may break the windows installation if removed?

#67
boogerlad

boogerlad

    Junior

  • Member
  • Pip
  • 52 posts
I keep getting access denied for the last part with the batch removal. Has anyone been successful in executing it? It seems that changing permissions breaks the installation from what I read.

EDIT: Extracting the wim with 7-zip and running the batch file works there... And it seems to install fine. Is that an "okay" alternative?

Edited by boogerlad, 23 June 2011 - 09:42 PM.


#68
alvinkhorfire

alvinkhorfire

    Member

  • Member
  • PipPip
  • 104 posts

I keep getting access denied for the last part with the batch removal. Has anyone been successful in executing it?

So, does access denied cause the selected files unable to be selected? If so, this is how I solved it. For me, this occurs if I use WAIK for Windows 7. If I use WAIK for Windows Vista, there will not be any access denied and all selected files are deleted.

#69
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag

I think it's because you have extracted files inside install.wim with 7-zip!!
For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#70
boogerlad

boogerlad

    Junior

  • Member
  • Pip
  • 52 posts
Um, no. At first, the image was mounted with gimagex with no waik installed, and the batch file was ran inside the mounted image's folder. I kept on getting access denied. Then, I decided to extract the wim with 7-zip and run the batch file. It worked perfectly, but I'm wondering if that's an "okay" method? Of course, it would be better if I can fix the access denied issue with gimagex.

#71
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag

I keep getting access denied for the last part with the batch removal. Has anyone been successful in executing it? It seems that changing permissions breaks the installation from what I read.

EDIT: Extracting the wim with 7-zip and running the batch file works there... And it seems to install fine. Is that an "okay" alternative?


OK! It seems I misunderstood your post!? Alternative with 7-zip :ph34r:

Edited by myselfidem, 24 June 2011 - 04:16 AM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#72
boogerlad

boogerlad

    Junior

  • Member
  • Pip
  • 52 posts


I keep getting access denied for the last part with the batch removal. Has anyone been successful in executing it?

So, does access denied cause the selected files unable to be selected? If so, this is how I solved it. For me, this occurs if I use WAIK for Windows 7. If I use WAIK for Windows Vista, there will not be any access denied and all selected files are deleted.


Waik doesn't get used at all in the last batch file for removal...


I keep getting access denied for the last part with the batch removal. Has anyone been successful in executing it? It seems that changing permissions breaks the installation from what I read.

EDIT: Extracting the wim with 7-zip and running the batch file works there... And it seems to install fine. Is that an "okay" alternative?


OK! It seems I've misunderstood your post!? Alternative with 7-zip :ph34r:


haha, don't worry. My english is pretty bad, so I'm sorry for the misunderstandings. If no one else used 7-zip before, how did all you guys get past the "access denied" error? I'm on a clean win 7 sp1 install on virtualbox with uac off.

#73
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag
Thanks!
Maybe those "workaround" can help you:

http://www.msfn.org/...n/page__st__100 (post # 105)

http://www.msfn.org/...al/page__st__40 (post # 45)

I will make an test and I give you later the result! ;)

*Edit: Have you tried to launch the batch files with right-click and use "Run As Administrator"?

Edited by myselfidem, 24 June 2011 - 04:16 AM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#74
myselfidem

myselfidem

    Member

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,559 posts
  • OS:Windows 7 x64
  • Country: Country Flag
@boogerlad

After many tests, I find the method unclear!
The layout needs to be updated!

The batch file is only available for en-US version! Some lines inside needs to be changed for localised version (mine is French version)

Some people found a workaround:

http://www.msfn.org/...n/page__st__100

Or using: takeown
http://www.msfn.org/...al/page__st__40 (post # 45)

Sorry, I can't give you more help!

Anyway, I know it's a hard work made by dead0

Edited by myselfidem, 25 June 2011 - 12:00 PM.

For Windows 7 OS: SetProductKey.rar (fr-FR/en-US. Integrate keys).

#75
boogerlad

boogerlad

    Junior

  • Member
  • Pip
  • 52 posts
Tested both methods, and I get access denied, even in admin mode. Running the batch under the special waik2.0 command line fails too. Tested with 7-zip. It installs, but it fails at "installing drivers" after the first boot.

edit: It seems running the batch file with waik1.1 makes it work, but the reduced file size isn't as much!? Extracting the wim with 7-zip and running the batch resulted in 1gb, but with waik1.1, I get 1.4gb.

Edited by boogerlad, 26 June 2011 - 12:33 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users



How to remove advertisement from MSFN