I've written a command line tool to create xml files for the component removal feature of 7Customizer. There are still a few steps required to get a good working xml file, but this tool helps considerably. The xml schema for 7Customizer can be located here. [Note: Since version 0.9.90, the xmls created with this tool are no longer corresponding to that format. There are two changes: a new element <Manifests> was introduced to remove bloat and make component removal more reliable; and you can use more than one wildcard in an element path name. Unfortunately, this makes xmls created with this tool incompatible with 7Customizer 0.5.0c. This might change in the future.]
The readme file from the download is below. Please read it carefully before downloading it!
It creates a xml file for the component removal feature of 7Customizer.
It does this by either searching for one or more keywords inside the
Windows 7 source manifest files, or by using a provided manifest file
How to use it:
1) Open you windows installation sources and extract one image in the
install.wim file (for example with 7-zip). Use the biggest image if
possible (Ultimate) for best results. You will need at least
the manifest files folder located under Windows\winsxs\Manifests and
the registry hives DEFAULT, SOFTWARE, and SYSTEM located under
Windows\System32\config. If you want to get the size attribute right
and find (hopefully) all files for the xml, you will need everything
(this is recommended).
Alternatively, you can mount an image with dism or imagex. But I
recommend using a fast computer for this. Otherwise, all searches are
2) Make sure the paths inside the settings.ini file point to the correct
locations. Also, follow the comments inside the settings file.
- Look inside your Windows 7 sources for the Windows\winsxs\Manifest
folder. Browse through the manifest files and choose one or more
- Create a file that has a list with full paths and manifest file names.
Each line has to contain one manifest file.
4) Run create.exe. Here some examples:
create -k notepad -c Notepad
create -o microsoftgames -k "games gameexplorer" -x mines
create -o editors -m "notepad.xml wordpad.xml"
create -d xml/editors.xml
For more info, run it with -h.
5) Wait. Sometimes even longer. Seriously, this thing is marvellously
inefficient. If you have a big component, This can easily last a few
minutes. On my old Pentium M, it ran for several minutes for the
6) Open your new xml file and check that eveything looks good. You
have to fill in all the missing information you didn't give on the
command line (for example for the <Componenet> and <Description>
elements). The <Keys> and <values> elements should also
be checked for redundancies and that not too much is removed.
[Optional: Run the tool with the -d option on the xml file after editing
it. This will remove redundant elements. For example, if there is a
<Key> element which you shortened, all elements under <Keys> and
<Values> that contain that path will be removed. This makes editing big
xml component files much easier.]
7) Test, and test some more. Make sure, that everything works as it
should. It's best to only remove one component at a time with
7Customizer and then test the image thoroughly. Make sure that
everything that is in some way related with the removed component still
How to use -b option
-b lets you interfere in the creation of the xml (with options -k and
-f) in a semiautomatic way. -b takes a file as an option that almost
follows the ini file format. You can define elements that should be
added or removed while building the xml. This is done before optimizing,
so if you add the correct elements into the file, you won't need to edit
the xml after it's creation.
This is mainly useful for batch files that use create.exe. I use it to
recreate all working xmls after I fix bugs that have an effect on the
xml files or when 7Customizer changes the way it handles the xml files.
I provided an example file that explains and gives some examples on how
to use this feature. The file has two sections, [add] and [remove].
There don't need to be both sections present. Each section can have any
number of the following parameters: file, dir, key and value. Each
parameter takes a path without quotes as a value. The only exeptions are
the key and value parameters in the [add] section (see rules below). The
basic syntax is as follows:
parameter = path
dir = Windows\Cursors
The following rules must be observed:
- all sections ([add], [remove]), parameters (file, dir, key, value) and
paths are case sensitive
- no quotes around paths except in the key and value parameters in
the [add] section.
- paths must be exaclty as they appear in the xml file
- there may be more than one of the same parameter in one section (e.g.
several file parameters in the [remove] section)
- the key parameter in the [add] section has the following syntax:
key = part "path" (where part is software, system, components or
- the value parameter in the [add] section has the following syntax:
value = part "path" value
(where part is software, system, components or default)
- any parameter with empty values will be ignored
- otherwise the normal ini configuration file rules apply
- At least Windows XP (tested on XP and 7 pro)
- Enough hard disk space for the extracted Windows 7 sources (around 12 GB)
Please report any bugs to this thread or pm me.
This software is provided as is and without warranty.
There are two variants. One is the perl script itself and one is the binary. I recommend the binary version for anybody not currently having a perl interpreter running. But beware that the binary might not work. Perl scripts packet into a binary are not known for their protability.
New release (Warning: This version is not compatible with 7Customizer any more. This might change in the future. Use old version below)
Binary: Xml creator 0.9.96
Source: Xml creator 0.9.96 perl script
Old release (compatible with 7Customizer 0.5.0c)
Binary: Xml creator 0.9.20
Source: Xml creator 0.9.20 perl script
Features for future versions
- Ideas anybody?
version 0.9.96 - bugfix release
- changed deleteLine format to include the parent of the line to delete;
this allows for much cleaner automatic editing of files and hopefully
a more intact component store. You need version 0.8 of the removal tool
for this to work properly.
- change: downgraded perl to 5.10.1 because of xml handling bugs
- added drag and drop batch files; see above for instructions.
version 0.9.95 - bugfix release
- fixed bug: too many packages added when processing only resource
manifest files (found by Moonchilde)
version 0.9.94 - bugfix release
- fix: rearranged packages into own xml element; you need version 0.7 of
the component removal utility for xmls generated with this version
version 0.9.93 - bugfix release
- fix: added detection and removal of packages for which all components
are added to the xml; this aleviates corrupted feature list and some windows update errors
version 0.9.92 - bugfix release
- change: remove .xml from logfile name
- fix: small adjustment to the <Manifests> section
version 0.9.91 - bugfix release
- fixed bug in optimization
- fix: too many registry entries were added
- fix: path for manifest files was missing a \
- fix: packaging error: libexpat-1_.dll not found
- warning: xmls generated with this version are no longer compatible with 7Customizer 0.5.0c
- changed xml format a little, so there are less redundancies and removal catches more
- changed: removed workarounds for bugs in 7Customizer
- fix: a little code cleanup
- added option -b FILE: automatically add or remove elements defined in FILE; see readme for more info
- added DriverStore\FileRepository directories; reduces the amount of file elements for drivers
- fix: refined check for invalid file names
- fix: changed check for extracted install.wim
- fix: crash found by tommyp while moving Wow6432Node from <values> to <keys> (there might be more)
This post has been edited by justibus: 27 March 2012 - 01:32 PM