Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

xml creator for 7Customizer


Recommended Posts

Regarding the registry with the* in its name. I am suggesting to replace the wildcard char from "*" to something else? What do you think?

That sounds fine. The question is, which one? It seems that registry keys have quite a lot of valid characters.

Regarding your suggestions, I will try tom implement them and I will update you with that.

Thanks!

On a side note, I updated the first post with a new release. This one just fixes bugs. No new features.

You can also find some new xmls in the xml component thread.

Cheers!

Link to post
Share on other sites

@ justibus

That sounds fine. The question is, which one? It seems that registry keys have quite a lot of valid characters.

this article on MSDN, says

Each key has a name consisting of one or more printable characters. Key names are not case sensitive. Key names cannot include the backslash character (\), but any other printable character can be used. Value names and data can include the backslash character.

So we need a sequence of characters instead of one, Like "@*" or "**" or "!!".

Could you suggest something that might ease your development in Perl. Anything is OK with me.

On a side note, I updated the first post with a new release. This one just fixes bugs. No new features.

You can also find some new xmls in the xml component thread.

Thanks. I included them in the latest release 0.5.0b.

Regards

Link to post
Share on other sites

So we need a sequence of characters instead of one, Like "@*" or "**" or "!!".

I just noticed, it isn't as easy as that. The reg.exe command that you use for deleting registry entries does not work for the keys with an "*" (at least in my testing; see my second post up). So you would need a completely different approach for deleting registry entries. I know of only two other, through a .reg file or through an .inf file. I'd suggest you write the registry entries into a .reg file and import them with "regedit.exe /s". You still need to set the permissions for each key and value with setacl.exe (which works for these keys in my tests), but then just import the registry file either for each component or for all components just once.

For deleting a key just prepend a "-" to the key, for example:

[-HKEY_USERS\win7sys\ControlSet001\Control\Keyboard Layouts\00000401]

and for deleting a value put "-" after the "=" instead of the data:

[HKEY_USERS\win7sys\ControlSet001\Control\Keyboard Layouts\00000401]
"Layout File"=-

As for the character sequence, let's take "!!". I searched the registry and there is no such sequence in there. So it should be safe.

Thanks!

Link to post
Share on other sites

@ blue,

Thanks!

And I have two more feature requests (sorry about them trickling in and not bringing them all at once):

- An option to turn off files and registry key deletion verification. The verification usually takes a huge amount of time, much longer than the deletion itself.

- An option to rebuild the image. This can be accomplished with the "imagex /export" command.

Cheers!

Link to post
Share on other sites

@ blue,

I found two more bugs:

- deleting a (Default) value produces an error and halts the command line. The problem is that (Default) values don't have a value name. The manifest file looks like this:

<registryValue name="" valueType="REG_SZ" value="HomeGroup Begin Page" operationHint="replace" owner="true" />

and the xml looks like this:

<Value part="software" path="Microsoft\Windows\CurrentVersion\XWizards\Components\{009f3b45-8a6b-4360-b997-b2a009a16402}" value=""/>

In the registry editor it looks like this:

default_value.PNG

And here is the error in the console window:

WARNING: The parameter <HKLM\7software\Microsoft\Windows\CurrentVersion\XWizards\Components\{009f3b45-8a6b-4360-b997-b2a009a16402}" -ot reg -actn setowner -ownr n:S-1-5-32-544;s:y -rec yes> contains a double quotation mark ("). Did you unintentionally escape a double quote? Hint: use <"C:\\"> instead of <"C:\">.
ERROR: The object path was not specified.

SetACL finished with error(s):
SetACL error message: The object was not set
WARNING: The parameter <HKLM\7software\Microsoft\Windows\CurrentVersion\XWizards\Components\{009f3b45-8a6b-4360-b997-b2a009a16402}" -ot reg -actn ace -ace n:S-1-5-32-544;p:full;s:y;i:so,sc;m:set;w:dacl -rec yes> contains a double quotation mark ("). Did you unintentionally escape a double quote? Hint: use <"C:\\"> instead of <"C:\">.
ERROR: The object path was not specified.

SetACL finished with error(s):
SetACL error message: The object was not set
Delete the registry value /f (Yes/No)?

I have attached an xml which demonstrates this.

I think the error occurs because the /v switch for deleting values with reg.exe does not work on (Default) values. You need to use the /ve swicht for that and omit the value name.

When using a .reg file, I think it works like this:


[path_of_registry_key]
""=-

- When selecting a component category in 7Customizer (e.g. "System" or "Accessoires"), none of the components in the tree are actually selected.

And thanks for the new version!

Cheers!

Edit: I just uploaded a new version of xml creator for 7Customizer. There was a bug that made 7Customizer skip all value elements inside the xmls. This is fixed now.

homegroup.xml

Edited by justibus
Link to post
Share on other sites

I uploaded version 0.9.3. Fixed a few more bugs because of optimization... This won't ever stop, won't it...

Ah well. If there are no more bugs found, the next version will be no more beta. I will wait with that one until all the known bugs pertaining to 7Customizer are fixed.

Link to post
Share on other sites
  • 2 weeks later...

just - This is a great program, kudos for taking the inititive in creating this!!!!

Just wondering, is it possible to update the create program to auto-create the wildcarded manifest filenames instead of manually fixing them? Here's a hint, if you take the manifest filename and use an underscore as a deilmiter, the 6th string of characters can be wildcarded, maybe the first string can be wildcarded too.

On a sidenote, when the program is finished running, I get a message that says "'perl.exe' is not recognized as an internal or external command, operable program or batch file" but the program runs fine with the correct output.

Link to post
Share on other sites

Thanks!

Just wondering, is it possible to update the create program to auto-create the wildcarded manifest filenames instead of manually fixing them? Here's a hint, if you take the manifest filename and use an underscore as a deilmiter, the 6th string of characters can be wildcarded, maybe the first string can be wildcarded too.

I'm not quite sure what you mean. Do you mean making out of this:


amd64_microsoft-windows-b..oyment-languagepack*.mainfest

the following?


*microsoft-windows-b..oyment-languagepack*.mainfest

The current inplementation should put the last wildcard (as in the first code example). The wildcard at the beginning of the name would be a useful feature (as in the second example), but currently it won't work, because 7Customizer only recognizes wildcards at the end of the file and directory names. Incidentally, in <File> elements with a deleteLine attribute, it's not recognized at all, at least it didn't work for me. But blue is working on a fix for that.

@blue: Maybe you could implement the wildcard at the beginning of filenames also?

On a sidenote, when the program is finished running, I get a message that says "'perl.exe' is not recognized as an internal or external command, operable program or batch file" but the program runs fine with the correct output.

I have also encountered this on systems without a perl installation. I haven't been able to figure out why it happens. It must be something in the exe packaging I use. Unfortunately, I don't have an alternative. So we just have to live with it.

Please keep the feedback coming. I probably missed a quite a few bugs. With your help, I can fix them.

Cheers!

Link to post
Share on other sites

@blue

How have you implemented removing lines from a file (for example pending.xml)? Is is possible that it's done during the verification phase? If so, could you move that to the first phase (or add another in between removing files and verifying files)?

I ask, because when I remove a component without verifying, I get an error during setup and I find all the component entries inside the pending.xml. But when I check file deletion verification, all the pending.xml entries are gone and setup works fine.

Link to post
Share on other sites

@just - Thanks for clarifying and pointing me to look at the right part of the resultant xml. I looked at the incorrect section. The xml looks very good. :)

I was having some probs removing various drivers (e.g. using a "-k prn" for printers and a "-k mdm" for modems). Obviously I tried different variations but I can't get these strings to work right. It seems to start creating a log file but create never finishes. Maybe it's looking for too many things in the registry? Is there a switch to avoid parsing the registry for valid entries?

Link to post
Share on other sites

You can use -n for not optimizing the xml. But you might end up with a lot of duplicate entries.

I just ran -k prn, and create doesn't even get beyond finding the manifest files. It just stops and doesn't do anything anymore. So there seems to be a bug somewhere. Thanks for finding it. I'll look into it.

Update: It seems, there are two things happening here.

- Somehow, writing the logfile for that input (-k prn) takes a huge amount of time. It is connected to some manifest file names, but I have no idea why it happens. And I haven't found a workaround yet. This is the only keyword I have found that does this.

- Some manifest files don't have complete information where files are stored. This means the tool has to search for the files in the extracted sources (provided they are extracted). The current implementation takes on my old laptop quite a long time for each file. Fortunately, this can be improved to some extend. I am working on it.

Edited by justibus
Link to post
Share on other sites

I released a new version of xml creator for 7Customizer. It has quite a few bug fixes (also the ones from the post just above) and internal reworkings. It doesn't rely on external applications any more (such as findstr.exe) which was error prone. As a nice side effect, the executable shrank to 7.5 MB (from 12 MB). The settings.ini format changed a bit. Please use the provided settings.ini and adjust your paths again.

Update - new version 0.9.11

There was a nasty bug introduced in 0.9.10 where the keyword search didn't work for 3 or more keywords any more. Thanks to tommyp for finding it.

Edited by justibus
Link to post
Share on other sites

justibus - thanks for this great tool

but i have a problem using it with -f switch it always say that it

with -k switch it say that it can't find the path to the winsxs also but it work

any idea why this happen

and again thanks for your had work

Link to post
Share on other sites

This means that you haven't extracted all the Windows 7 installation sources (from an image in install.wim file), or there's a bug in the tool. Have you extracted an entire image of the install.wim file? Could you give me the path to where you extracted it to?

Alternatively, you can mount an image using dism and give the mount directory as the source directory in the settings.ini file.

Also attaching the settings.ini file to your reply could help.

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.

×
×
  • Create New...