• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Jeronimo

Windows 7 x64 vLite "extreme removal"

221 posts in this topic

The following has already extensively been discussed under Windows 7 & vLite and I would appreciate continuing the discussion there when it is related Windows 7 component removal in combination with vLite.

Any bugs, questions, remarks and/or issues related to my work described below can be discussed here.

The following is not for the average user! You have to know a bit about the commandline in Windows as well as how batch-files work. It does not work out of the box and requires modifications to fit your needs, if you do not comprehend this, then be satisfied with the removal vLite can do for you (just stay clear of removing Game Explorer, IE8, Windows Firewall and Internet Connection Sharing).

I went a bit further on what I had achieved previously and I managed to remove most of Microsoft.NET up to the point that vLite still works (so no complete removal of .NET). After this the install.wim is 822MB, the installation is about 2.4GB without compression and pagefile-/hibernate-file, even a bit less (2.39GB) after you have performed the final step and for those interested it is 1.54GB with compression (though I would not choose to do this).

packages_xls.txt (rename to packages.xls)

Contains information about all Windows packages, vLite component, the relation between them, removal issues and specified removal (dism or vLite)

removal_bat.txt (rename to removal.bat)

Contains removal of packages, cleanup and language pack integration (not fully automated). Works by specifying a parameter (eg "removal.bat packages")

Please make sure you edit it to fit your needs (everything up to the choice between using imagex or dism for mounting, use imagex for proper functionality)

The removal.bat can perform the following actions :

parameter - action (see contents for possibilities)

<none> - initialize environment variables (a new prompt called "WIM-prompt" will be started)

updates - integrate updates with dism (not functional yet, might only work when executed under the same Windows 7 build)

packages - remove packages with dism (see packages.xls for details)

cleanup - remove files and folders

drivers - driver integration (recurses the specified folder)

pre - actions updates + packages

post - actions cleanup + drivers

full - actions packages + cleanup + drivers (not recommended)

langpack - integrate language pack in Windows 7

langpack2 - integrate language pack in Setup

final - register file for safe removal and extra removal of Microsoft.NET files (post-installation)

init2 - performs intialisation without setting parameters desribed below (used from removal_custom.bat)

The removal.bat contains the following parameters:

cb - empty (determine from %DVD%\setup.exe; can also be x86, amd64 for respectively Windows 7 32-bit, 64-bit)

build - 7600 (build number of your Windows version, default RTM-build)

svn - 16385 ("sub-version" of Windows build number)

pre - 31bf3856ad364e35 (do not change; string part used in the name of Windows Packages)

edition - HomePremium (Windows edition you will be modifying (case sensitive!): Starter, HomeBasic, HomePremium, Professional or Ultimate)

II - 2 (obsolete! - the image if that you will be modifying: 1 HomeBasic/Starter?, 2 Home Premium, 3 Professional, 4 Ultimate)

remove.NET - V (removal of Microsoft.NET: C for complete removal, V to keep vLite working or K to keep)

updateloc - C:\vLite\Updates (folder of updates to be integrated)

update.ext - * (extension of the updates to be integrated: msu, cab or * for all/both)

driverloc - C:\vLite\Drivers (folder of drivers to be integrated)

lang - nl-NL (your language code; see this page)

langid - 1043 (your language setting: see this page)

intlcfg - C:\vLite\intlcfg.exe (location of intlcfg.exe from WAIK)

langloc - C:\vLite\Langpack (location of your Language Pack)

DVD - C:\Windows 7 DVD (DVD & sources-folder containing install.wim and dism.exe)

mount - C:\Wim (folder for mount Dism/Imagex or Root Imagex only)

imagex - "C:\vLite\imagex.exe" (location of imagex.exe from WAIK)

Pre-requirements/notes

- in case of Windows 7 x64, make sure you are running a x64 version of Windows as well (only tested for x64);

- (have vLite) install the wim-filter, otherwise mounting the image will fail;

- Windows 7 DVD-contents (or ISO) copied to a local drive;

- dism.exe present in the sources-folder (for those of you that remove all files from the sources-folder);

- remove ei.cfg from sources-folder to be able to install all editions (not required for RTM/final);

- removal of Game Explorer component (by vLite) requires removal of Snipping Tool package (by dism);

- after the cleanup phase with nullify of winsxs-Backup, do not select any Component removal in vLite this will no longer work;

- final step is essential to keep vLite functioning (folder needs to be removed from Windows\assembly).

The following files need to be placed in the same folder as removal.bat (it alters the path, so it does not need to be root):

install_wim_tweak (direct link: win6x_registry_tweak_bin_v1.1.rar)

imagex.exe and intlcfg.exe from the Windows Vista SP1 AIK (take the proper version of these files amd64 for x64 or x86; Windows 7 AIK gives issues)

Recommended use

1. Modify the removal.bat to fit your needs (just in case you forgot)

2. Integrate Language pack (removal.bat langpack)

3. Integrate Updates (removal.bat updates)

4. Packages removal (removal.bat packages; 3/4: removal.bat pre)

5. vLite (Component removal only)

6. Cleanup of files and folders (removal.bat cleanup)

7. Integrate Drivers (removal.bat drivers; 6/7: (removal.bat post)

8. vLite (Tweaks only: reduce image size after cleanup)

9. Test on a secondary partition or to a virtual environment (such as VMware)

10. After installation final steps can be performed (removal.bat final)

edit: resolved a few issues with the removal.bat file.

edit 10-08-2009: corrected final & update (mount first; fix DirectX Web Setup -keep fusion.dll and mscorie.dll) action in removal.bat.

edit 11-08-2009: restored edition parameter (II - image index is obsolete now), take into account lang "en-US", renamed langcode to langid in removal.bat.

edit 15-08-2009: removed redundant removals (avm/Fritz, Printing, fonts) in removal.bat, added Ultimate-N details in packages.xls

edit 23-08-2009: cb parameter changed, restructured to allow usage with custom actions in removal_custom.bat (such as for SausageHack's guide; my example)

edit 30-08-2009: corrected use of Windows 7 AIK to Windows Vista SP1 AIK

edit 31-08-2009: corrected some issue for cleanup action (see this post and the reply to it)

edit 06-09-2009: corrected IEtail parameter for IE Optional package removal

edit 19-09-2009: corrected dism functionality, changed used location of language package (as seen in this post by franner)

edit 19-10-2009: corrected integration of updates (thanks again franner)

edit 23-10-2009: corrected check on codebase parameter cb.

edit 24-10-2009: repositioned codebase determination to correct functionality of package removals.

Windows_7.ini

packages_xls.txt

removal_bat.txt

Edited by Jeronimo
0

Share this post


Link to post
Share on other sites

@Jeronimo

few questions:

can you install printer

can you change WORKGROUP name

thanks

0

Share this post


Link to post
Share on other sites

@trickstar: no printer drivers, no printer support and no networking (only internet/WLAN)

Trying to get Windows as much down in size as possible. Only keeping essential components.

0

Share this post


Link to post
Share on other sites

how much its could take down the 32bit version ?

0

Share this post


Link to post
Share on other sites
imagex.exe and intlcfg.exe from the WAIK for Vista SP1

does it have to be from Vista SP1? any difference with the one from Win 7 RC WAIK

remove.NET - v (removal of Microsoft.NET: C for complete removal, V to keep vLite working or K to keep)

when using "remove.NET - v" ... have you tested other .NET apps apart from vLite?

thanks

0

Share this post


Link to post
Share on other sites

@aviv00: I have tried to add support for 32-bit Windows, but I have not tested it. If you test it and encounter issues, I could try help and these resolve issues. However I do not have Windows 7 32-bit and I have no intention on using it, let alone test it.

@trickstar:

I think imagex has to be from Vista SP1 WAIK, the one from Windows 7 RC works rather slow in every way (mount, unmount, compress, vLite). For the intlcfg I do have the 1 from the Windows 7 RC WAIK. Not sure weither the 1 from Windows 7 RC WAIK works, but you could try.

I have not tested any other .NET applications, because I do not have (want) any. I want to completely remove it, but I just need it for vLite. If not, then I would remove it completely.

0

Share this post


Link to post
Share on other sites

@dcatcher: Win Integrator reports several packages dependant on another main package. the "parent" package is x.0 and its "children" are x.1, x.2, ...

0

Share this post


Link to post
Share on other sites
@dcatcher: Win Integrator reports several packages dependant on another main package. the "parent" package is x.0 and its "children" are x.1, x.2, ...

for adding the Updates, modify the batch file according to this:

:updates

%mountimage%

for /f %%i in ("%updateloc%") do %sources%\dism.exe /image:"%mount%" /add-package /packagepath:"%%i"

if "%1" == "updates" goto end

Edited by awalraja
0

Share this post


Link to post
Share on other sites

@awalraja: thanks for the heads-up, I updated the removal.bat accordingly.

Edited by Jeronimo
0

Share this post


Link to post
Share on other sites

Jeronimo, your preset still contains all WLAN, firewall and windows update related components. We know you personally use windows update (and WLAN), but if you call this extreme you could add which components must be kept even after package removal like:

-MDAC

-Network and Sharing Center ?

-?

-?

-?

thanks!

0

Share this post


Link to post
Share on other sites

a little tip: (I think it's a dirty solution)

When doing cleanup, I get tons of access is denied. My solution is taking the ownership of every file in the mounted dir. This takes me 15 minutes.

But I don't know whether this has any side effect.

Edited by dcatcher
0

Share this post


Link to post
Share on other sites

If I don't have any drivers to integrate or any language packs because i'm english ;) can i just skip the associated steps :) ??

0

Share this post


Link to post
Share on other sites

I have an error saying "Windows cannot configure one or more components ...." near the end of installation.

I have changed the list of packages to be removed and haven't cleaned up the build.

I have searched the forum, and the only mentioned solution is to keep some components. However, the preset file windows7.ini removes thoese components without problem, I assume.

Do I have to stick with the listed components in removal.bat to avoid the error?

Edited by dcatcher
0

Share this post


Link to post
Share on other sites
I have an error saying "Windows cannot configure one or more components ...." near the end of installation.

I have changed the list of packages to be removed and haven't cleaned up the build.

I have searched the forum, and the only mentioned solution is to keep some components. However, the preset file windows7.ini removes thoese components without problem, I assume.

Do I have to stick with the listed components in removal.bat to avoid the error?

try after without modifying any of the services' startup mode.

0

Share this post


Link to post
Share on other sites

Yeah I seem to get the same error towards the end of the install as dcatcher. At first I thought I did something wrong in VMware. I will try vlite again without removing any services and only components and stuffs :) . Any tips here Jeronimo ??

0

Share this post


Link to post
Share on other sites

@dcatcher/Junior2613: what Windows edition are you performing this on?

I do not know which packages you keep (do not remove), maybe this is the reason without more information I can not tell: for instance do you keep the Snipping Tool package and remove Game Explorer with vLite, then this could be the reason?

0

Share this post


Link to post
Share on other sites
@dcatcher/Junior2613: what Windows edition are you performing this on?

I do not know which packages you keep (do not remove), maybe this is the reason without more information I can not tell: for instance do you keep the Snipping Tool package and remove Game Explorer with vLite, then this could be the reason?

I am using HomePremium.

I do remove snipping tools and game explorer. I attach the modified removal.bat here.

A different is that many packages comes with two version: en-US and neutral. I remove them both instead of just en-US as in the original removal.bat file.

I tried using the default setting for service and the error remains...

removal.bat.txt

Last_Session.ini

Edited by dcatcher
0

Share this post


Link to post
Share on other sites

i faced that error when i changed any of the services' startup type, i stopped doing that and it worked fine for me since then.

but i've another question . i didn't want to remove windows picture viewer and media player, but when i try to use them i get the errors "picture printing is not available without the desktop experience feature" and "the program can't start coz MF.dll is missing from your computer. try reinstalling the program to fix this problem" respectively. can anyone tell me which removed component is causing this?

0

Share this post


Link to post
Share on other sites
@dcatcher/Junior2613: what Windows edition are you performing this on?

I do not know which packages you keep (do not remove), maybe this is the reason without more information I can not tell: for instance do you keep the Snipping Tool package and remove Game Explorer with vLite, then this could be the reason?

I am using HomePremium.

I do remove snipping tools and game explorer. I attach the modified removal.bat here.

A different is that many packages comes with two version: en-US and neutral. I remove them both instead of just en-US as in the original removal.bat file.

I tried using the default setting for service and the error remains...

It seem that I find the problem.

using Dism /Get-WIMInfo /WimFile:e:\iso\sources\install.wim to get the index of home premium:

Index : 1

Name : Windows 7 STARTER

Description : Windows 7 STARTER

Size : 7,936,340,784 bytes

Index : 2

Name : Windows 7 HOMEBASIC

Description : Windows 7 HOMEBASIC

Size : 7,992,394,907 bytes

Index : 3

Name : Windows 7 HOMEPREMIUM

Description : Windows 7 HOMEPREMIUM

Size : 8,432,859,356 bytes

Index : 4

Name : Windows 7 PROFESSIONAL

Description : Windows 7 PROFESSIONAL

Size : 8,313,318,889 bytes

Index : 5

Name : Windows 7 ULTIMATE

Description : Windows 7 ULTIMATE

Size : 8,471,060,645 bytes

So, index 2 is actually homebasic in the original removal.bat for my situation.

I suggest using /Name:"Windows 7 HOMEPREMIUM" option instead of /Index, for example:

Dism /Mount-WIM /WimFile:C:\test\images\install.wim> /Name:"Windows 7 HomeBasic" /MountDir:C:\test\offline>

Different image can have different indexes.

I will keep my status updated....right now I am rebuilding...

0

Share this post


Link to post
Share on other sites

@dcatcher: do not remove the language packages, they are automatically removed when you remove a component. Do not use dism to mount the image as it does not work properly in combination with install wim tweak. Finally the index is indeed not handy, I will try and change it to use the edition.

Also the language code is for seondary languages only not for primary en-US, this might break it as well.

0

Share this post


Link to post
Share on other sites
but i've another question . i didn't want to remove windows picture viewer and media player, but when i try to use them i get the errors "picture printing is not available without the desktop experience feature" and "the program can't start coz MF.dll is missing from your computer. try reinstalling the program to fix this problem" respectively. can anyone tell me which removed component is causing this?

any help on this problem? jeronimo, anyone :(

0

Share this post


Link to post
Share on other sites

@awalraja: mentioning of files required means you add files to the "protect files" in vLite yourself. Windows picture viewer was also broken for me, I could not find out what component or pacakge it was and as I have a good enough replacement (IrfanView) I let it go. For Windows Media Player I use Media Player Classic Home Cinema (although others prefer mplayerc, VLC).

0

Share this post


Link to post
Share on other sites
@awalraja: mentioning of files required means you add files to the "protect files" in vLite yourself. Windows picture viewer was also broken for me, I could not find out what component or pacakge it was and as I have a good enough replacement (IrfanView) I let it go. For Windows Media Player I use Media Player Classic Home Cinema (although others prefer mplayerc, VLC).

ok, thanks for the info. i also prefer VLC player, but i keep media player as secondary option. anyway, i'll try to solve the issues myself if no further information is available.

0

Share this post


Link to post
Share on other sites
@dcatcher: do not remove the language packages, they are automatically removed when you remove a component. Do not use dism to mount the image as it does not work properly in combination with install wim tweak. Finally the index is indeed not handy, I will try and change it to use the edition.

Also the language code is for seondary languages only not for primary en-US, this might break it as well.

Thanks for the advice, Jeronimo!

By the way, what's the problem with dism and install_wim_tweak, it works well here and I don't notice anything wrong.

After correcting the index problem, the installation goes all right. But the NAT network in virtualbox is not working. and all search boxes are missing too. I definitedly removed too much. I will start over again.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.