Jump to content

Windows 7 x64 vLite "extreme removal"


Jeronimo

Recommended Posts

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
Link to comment
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

Link to comment
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.

Link to comment
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
Link to comment
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!

Link to comment
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
Link to comment
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
Link to comment
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.

Link to comment
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.
×
×
  • Create New...