The components removal feature in 7Customizer uses XML files to determine how a component should be removed. These files are located in the folder "components" inside the folder "work".
7Customizer reads these XMLs and build the tree in the components tab, display information about the component from the XML and remove the component based on the information present in the XML.
I chose this method because I wanted everyone to contribute to the component removal feature. So, in this guide I will explain everything related to the components XML.
If you can contribute to 7Customizer, then create your XML and put it in a zip file and upload it. Make sure it is tested on an untouched Windows 7 installation source. Also make sure you test the installation.
Request for mods: Kindly, make this post as sticky.
Note: This guide requires basic knowledge of XML and knowledge of the components in Windows 7 and how they are structured. Also, some knowledge of Windows registry and how to manipulate it is required.
To learn about XML: read about it here.
Note: Never ask questions about XML, read first about it.
Note: I will explain the XML with stickynotes.xml as an example.
Tip: I recommend using Notepad++ with the plugin XML tools installed.
Download Notepad++ here.
The XMLTools here.
Table of Contents:
1. XML Layout
2. Component element
3. Description element
4. DespendantComponent
5. NeededFor
6. Files
7. File
8. Directories
9. Directory
10. Registry
11. Keys
12. Key
13. Values
14. Value
15. How to identify files, directories and registry keys and values for a certain component.
16. Not implemented parts
17. Features to add
18. Tips
1. XML Layout
The XML must first start with the root _7Customizer. Then the "Component" which has the following children:
Description, DependantComponenets ,NeededFor, Files,Directories,Registry.
2. Component element
The component tag has the following attributes:
name: The name of the component
requiredForStableSystem: a true or false value that states whether the component is required for a stable system.
size: The size in MB.
group: The group which the component belongs to.
3. Description element
The Description element contains the description of the component.
4.DependantComponenets element
The DependantComponenets element lists the components that depend on this component.
5. NeededFor element
The NeededFor element lists the software that require this component to function properly.
6. Files element
The Files element contains a list of the files to be deleted.
7. File element
The File element contains the following attributes:
path: the path to the file to be deleted. It is relative to the location where the image is mounted.
Wildcard can be used here with the character “*" which must be placed before the extension of the file and at the end of the file name.
method: either "delete" or "deleteLine" string: the String to be matched with the lines in the file. this means that every line that contains the string will be deleted.
8. Directories element
The Directories element contains a list of the directories to be deleted.
9. Directory element
The Directory element contains the following attributes: path: The path of the directory. Wildcard can be used here with the character "*" which must be placed at the end of the directory name.
10. Registry element
The Registry element contains a list of the keys and values to be removed.
11. Keys element
The keys element contains a list of keys to be deleted
12. Key element
The key element contains the following attributes:
path: The path to the key. . Wildcard can be used here with the character "*" which must be placed at the end of the key name.
Note: The "*" is allowed in a regestry key name. Rarely you will find a registry key that contains "*".
part: The registry part which the key is located. The parts are:
components: Represents the registry hive "components"
system: Represents the registry hive "HKEY_LOCAL_MACHINE\SYSTEM"
default: Represents the registry hive "default"
software: Represents the registry hive "HKEY_LOCAL_MACHINE\SOFTWARE"
13. Values element
The Values element contains a list of registry values to be deleted.
14. Value element
The value element contains the following attributes:
path: The path to the key which holds the value
part: the registry part which the key is located
value: the name of the value to b deleted
15. How to identify files, directories and registry keys and values for a certain component.
Note: It is recommended to use a Windows 7 x64 image because it will have the files for both the x86 and x64.
To do so follow these steps:
15.1. Know the name of the component e.g. Sticky Notes.
15.2. Go to the folder Windows\winsxs\Manifests in Windows 7.
15.3. Search for the files that their name contains the name of the component.
15.4. Open these files (which have the extension .manifest) with a text editor (Notepad++ recommended) and inspect the content. You will find some file, directory and registry elements.
15.5. Map these to your XML.
15.6. Add the names of the manifests files you found to the XML also. (Wildcards are recommended)
15.7. Go to the folder Windows\winsxs and find the directories which have the component name. Add thier names to your XML.(Wildcards are recommended)
15.8. Open Windows\winsxs\pending.xml with a text editor and look if there are lines that contain the component name and add them to your XML.
15.9. Load the hive "components" located in Windows\System32\config to your registry and go to the key "DerivedData\Components" and search for keys that contain the component name and add them to your XML.
15.10. Place the XML in the components folder with a name that does not have white spaces and only small letters.
15.11. Test the XML.
16. Not implemented parts
The following elements are still not handled by 7Customizer:
DependantComponenets ,NeededFor
So do not bother yourself with them and wait for a release that supports them.
17. Features to add
The ability to insert registry keys and values to the image registry, which means custom registry tweaks.
The ability to delete part of a registry value (Not the whole value). (thanks Schemek for the suggestion).
18. Tips
1. The HKEY_CLASSES_ROOT is a hive that points to HKEY_LOCAL_MACHINE\SOFTWARE\Classes.
2. Always remember that XML elements and attributes are case sensitive.
3. Check your XML for errors using the XML tools in Notepad++.
If you have any question about components XML, please ask them here. For questions about 7Customizer post it in the main thread of 7Customizer.
Regards
This post has been edited by blue4603: 26 March 2011 - 10:38 AM



Help
Back to top











