MSFN Forum: Windows 7 Ultimate/Server 2008 R2 Enterprise SP1 Batch Removal - MSFN Forum

Jump to content


vLite Forum Rules

If you are having issues with Windows after removing components and have come to ask for help, please attach (not paste) your Last Session.ini file to your post to facilitate quicker assistance.
  • 7 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Windows 7 Ultimate/Server 2008 R2 Enterprise SP1 Batch Removal dism + vlite + batch file removal for official release Rate Topic: -----

#41 User is offline   dark79 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 25-November 07

Posted 18 March 2011 - 04:43 AM

View PostThePegass, on 13 March 2011 - 03:49 PM, said:

dead0: Hi, I have a problem (look at screenshot). I did everything following your guide to prepair image:

- Installed WAIK 2.0
- Ticked RW, Commit. Mounted image (original install.wim) using Gimagex with image 4 (x64).
- Unmounted image with Commint changes ticked.
- Uninstalled WAIK 2.0.
- Restarted Windows.
- Installed WAIK 1.1.
- Mounted image using Gimagex with image 4 (x64).
- Used tweak.exe /m. Ok.
- Unmounted image with Commint changes ticked.
- Mounted image using Gimagex with image 4 (x64).
- Started dism7x64.bat (c:\s1\sources) downloaded from first post of this thread.
After removed few packages it give me this error:
Attachment Capture.JPG

...what I´m doing wrong?


I get the same problem. It always occurs when dism tries to remove "Microsoft-Windows-Backup-Package" which is very early in the batch file. It errors at about 95% and then causes the "image is no longer serviceable" error for the rest of the dism commands.

I unmounted without committing changes, removed that line in the batch file, remounted and re-ran the batch file. It makes it all the way through without the error.

Edit: Also happens at "Microsoft-Windows-Shell-InboxGames-Package" and "Microsoft-Windows-SystemRestore-Package"

Edit 2: I have a few packages commented out that I keep, so this error may happen elsewhere, too.

This post has been edited by dark79: 18 March 2011 - 05:11 AM



#42 User is offline   Hybrid Keyrayder 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 27-September 07

Posted 18 March 2011 - 06:49 PM

Using ThePegass sollution, I managed to create the iso successfully. I tested in vmware and the only problem i have is at the finishing stage where it configures all the settings. When it gets to "setup is starting services...", a pop-up displays "Windows could not complete the installation. To install windows on this computer, retsrat the installation."

#43 User is offline   dark79 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 25-November 07

Posted 20 March 2011 - 12:54 PM

I gave up trying to get this to work with WAIK 1.1 / vLite. Sure it's faster, but there are too many problems with it.

Switched to WAIK 2.0 / RT7Lite and it's super SLOOOOW but I don't get the dism errors from before and I don't get errors after installing windows.

Still using the same batch files. 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.

#44 User is offline   alvinkhorfire 

  • Member
  • PipPip
  • Group: Members
  • Posts: 103
  • Joined: 11-May 08

Posted 20 March 2011 - 11:25 PM

dark79

Do you mind sharing the 2 lines of the command here? Thanks.

dead0

Can I use wim tweak while WAIK for Windows 7 is installed? Or, can it only be used when WAIK for Windows Vista is installed? Thanks.

#45 User is offline   dark79 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 25-November 07

Posted 21 March 2011 - 04:43 AM

I found someone with the same problem in another thread and they suggested I added the following lines:

takeown /f windows /r /d y
icacls windows /grant administrators:F /T

I put these after line 18 (echo on) so that they run before the winsxs delete commands

It makes the batch file run twice as long though because it has to go through the whole Windows directory. I could have edited it to only take ownership of the folders that had problems, but I was lazy :)

#46 User is offline   dead0 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 488
  • Joined: 29-October 06
  • OS:none specified
  • Country: Country Flag

Posted 21 March 2011 - 04:46 PM

View PostHybrid Keyrayder, on 18 March 2011 - 06:49 PM, said:

Using ThePegass sollution, I managed to create the iso successfully. I tested in vmware and the only problem i have is at the finishing stage where it configures all the settings. When it gets to "setup is starting services...", a pop-up displays "Windows could not complete the installation. To install windows on this computer, retsrat the installation."

did you keep anything extra in vlite that was checked for removal in my lastsession.ini? did you also select winsxs removal in vlite?

#47 User is offline   dead0 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 488
  • Joined: 29-October 06
  • OS:none specified
  • Country: Country Flag

Posted 21 March 2011 - 04:47 PM

View Postdark79, on 20 March 2011 - 12:54 PM, said:

I gave up trying to get this to work with WAIK 1.1 / vLite. Sure it's faster, but there are too many problems with it.

Switched to WAIK 2.0 / RT7Lite and it's super SLOOOOW but I don't get the dism errors from before and I don't get errors after installing windows.

Still using the same batch files. 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.

have you tried the alternate method posted by bapt to prep the image? the link to his post is in the first post of this topic

#48 User is offline   dead0 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 488
  • Joined: 29-October 06
  • OS:none specified
  • Country: Country Flag

Posted 21 March 2011 - 04:49 PM

View Postalvinkhorfire, on 20 March 2011 - 11:25 PM, said:

dark79

Do you mind sharing the 2 lines of the command here? Thanks.

dead0

Can I use wim tweak while WAIK for Windows 7 is installed? Or, can it only be used when WAIK for Windows Vista is installed? Thanks.

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

#49 User is offline   Hybrid Keyrayder 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 27-September 07

Posted 22 March 2011 - 12:00 AM

View Postdead0, on 21 March 2011 - 04:46 PM, said:

did you keep anything extra in vlite that was checked for removal in my lastsession.ini? did you also select winsxs removal in vlite?


Lastsession is unchanged and I tried with and without winsxs removal in vlite and it gives me the same error.

Using your dism and lastsession only (without applying your batch removal), I get this error: Windows Setup could not configure Windows to run on this computer's hardware

This post has been edited by Hybrid Keyrayder: 23 March 2011 - 02:47 PM


#50 User is offline   dark79 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 25-November 07

Posted 22 March 2011 - 05:23 AM

View Postdead0, on 21 March 2011 - 04:47 PM, said:

View Postdark79, on 20 March 2011 - 12:54 PM, said:

I gave up trying to get this to work with WAIK 1.1 / vLite. Sure it's faster, but there are too many problems with it.

Switched to WAIK 2.0 / RT7Lite and it's super SLOOOOW but I don't get the dism errors from before and I don't get errors after installing windows.

Still using the same batch files. 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.

have you tried the alternate method posted by bapt to prep the image? the link to his post is in the first post of this topic


Yeah, but certain packages error during removal with dism causing the "image is no longer serviceable" errors. If I stick with WAIK1.1 they have to stay in. If I use WAIK 2.0 they can be removed without errors.

#51 User is offline   alvinkhorfire 

  • Member
  • PipPip
  • Group: Members
  • Posts: 103
  • Joined: 11-May 08

Posted 23 March 2011 - 01:03 AM

View Postdead0, on 21 March 2011 - 04:49 PM, said:

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?

#52 User is offline   xpJohnson 

  • Junior
  • Pip
  • Group: Members
  • Posts: 51
  • Joined: 01-January 09

Posted 24 March 2011 - 07:23 PM

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

#53 User is offline   dead0 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 488
  • Joined: 29-October 06
  • OS:none specified
  • Country: Country Flag

Posted 25 March 2011 - 06:28 PM

View Postalvinkhorfire, on 23 March 2011 - 01:03 AM, said:

View Postdead0, on 21 March 2011 - 04:49 PM, said:

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

View PostxpJohnson, on 24 March 2011 - 07:23 PM, said:

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 User is offline   Hybrid Keyrayder 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 27-September 07

Posted 29 March 2011 - 02:24 PM

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 User is offline   alphaniner 

  • Group: Members
  • Posts: 4
  • Joined: 22-November 10
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 29 March 2011 - 03:17 PM

View Postdark79, on 20 March 2011 - 12:54 PM, said:

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.

This post has been edited by alphaniner: 29 March 2011 - 04:06 PM


#56 User is offline   alvinkhorfire 

  • Member
  • PipPip
  • Group: Members
  • Posts: 103
  • Joined: 11-May 08

Posted 30 March 2011 - 02:08 AM

View Postdead0, on 25 March 2011 - 06:28 PM, said:

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:

wnuku, on 29 March 2011 - 05:19 AM, said:

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. :)

This post has been edited by alvinkhorfire: 30 March 2011 - 02:11 AM


#57 User is offline   xpJohnson 

  • Junior
  • Pip
  • Group: Members
  • Posts: 51
  • Joined: 01-January 09

Posted 31 March 2011 - 08:50 AM

View Postdead0, on 25 March 2011 - 06:28 PM, said:

View PostxpJohnson, on 24 March 2011 - 07:23 PM, said:

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 User is offline   dead0 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 488
  • Joined: 29-October 06
  • OS:none specified
  • Country: Country Flag

Posted 01 April 2011 - 01:20 PM

View PostxpJohnson, on 31 March 2011 - 08:50 AM, said:

View Postdead0, on 25 March 2011 - 06:28 PM, said:

View PostxpJohnson, on 24 March 2011 - 07:23 PM, said:

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

This post has been edited by dead0: 02 April 2011 - 11:01 AM


#59 User is offline   Ultimist 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 02-October 09

Posted 10 April 2011 - 09:16 PM

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.

This post has been edited by Ultimist: 10 April 2011 - 09:22 PM


#60 User is offline   dark79 

  • Newbie
  • Group: Members
  • Posts: 10
  • Joined: 25-November 07

Posted 16 April 2011 - 11:53 AM

View PostUltimist, on 10 April 2011 - 09:16 PM, said:

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.

View Postalphaniner, on 29 March 2011 - 03:17 PM, said:

View Postdark79, on 20 March 2011 - 12:54 PM, said:

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.

This post has been edited by dark79: 19 April 2011 - 05:41 AM


Share this topic:


  • 7 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

6 User(s) are reading this topic
0 members, 6 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy