Jump to content

xml2reg sort of a tool


joakim

Recommended Posts

http://www.mediafire.com/file/dyqnzzmj4mt/xml2reg_v3.zip

As most people know by now, Windows 7 Embedded is the componentized version of Windows 7. Ie, it built up of many packages or feature packs as they call them, and these packages can be installed/uninstalled with dism.exe. Inside these packages (.cab) all necessary files are bundled along with manifest files. These manifests contain, along with much else, the necessary registry information for each specific package. Usually 1 manifest accompanies each binary. The registry information is located inside;


<registryKeys>
and
</registryKeys>

The point is that this may be of great help when developing stuff for WinPE. That's why it's posted in this section.

The manifests are xml structured, and the tool does what the title says. It converts the registry information into a valid registry file (.reg), more easily read.

Since there exist a lot of manifests inside these packages, it is probably smartest to run this from a batch;


for %%i in ("I:\iso\packages(win7)\x86~winemb-fs-smb~~~~6.1.7600.16385~1.0\WinEmb-FS-SMB\*.manifest") do xml2reg.exe %%i

Joakim

Edited by joakim
Link to comment
Share on other sites


Thank you. I think it is works for windows 7 manifest files too? Only for cab package manifests or the ones in winsxs folder? If you can give an example usage for winpe environment i will be glad.

I take Autoit Error L-1

Error:Array variable has incorrect number of subscripts or subscript dimension rage exceed.

does it works in xp? what does it need to work? framework version or else?

Link to comment
Share on other sites

Thank you. I think it is works for windows 7 manifest files too? Only for cab package manifests or the ones in winsxs folder? If you can give an example usage for winpe environment i will be glad.

I take Autoit Error L-1

Error:Array variable has incorrect number of subscripts or subscript dimension rage exceed.

does it works in xp? what does it need to work? framework version or else?

I think you misunderstood a little. xml2reg was not itself meant for running in a PE. It may help you while developing stuff for PE. The manifest files that it should be run against, is the ones found inside the component packages that are shipped with Windows 7 Embedded. And target WinPE version, would thus be the newest (3.0), which is also based on Windows 7.

In the example batch in first post, you would first need to unpack the file WinEmb-FS-SMB.cab, before running the batch. It is inside this cab the manifests are found. The tool is not meant for the manifests found in the winsxs subfolders (it is different).

I only tested the tool on an XP host (I also only run the Embedded 7 development inside a xp vm because it's faster (although not supported)). I will test the tool on a nt6.x system, to see if that is where the error is triggered.

Joakim

Link to comment
Share on other sites

i didnt try to work in winpe. i work it in windows xp and get that error but i used a manifest from winsxs folder. i mean how will it be helpfull for to develop a winpe with a small example. how to use that registry that it gives to us. import offline image? can be a way to use for winsxs manifests?

xml2reg.exe x86_microsoft-windows-vsswriters_31bf3856ad364e35_6.1.7600.16385_none_e3d4d0ce50f74247.manifest

nothing happens. code syntax wrong?

Edited by Kullenen_Ask
Link to comment
Share on other sites

@joakim

Thanks for xml2reg tool. Can be handy.

With PnPutil.exe one can Install all Hardware (except Video driver).

It would be nice if we can keep the settings and that PE3 would automatically adjust to hardware.

Universal PE3 Boot Image would be interesting, but until now I did not find a procedure that keeps the settings for next boot with PE3.

Universal XP and Windows 7 as made with IMG_XP package, learn from booting on various hardware and automatically adjust the drivers when booting.

Do you have ideas about it on How to make Universal PE3 ?

Edited by wimb
Link to comment
Share on other sites

@Kullenen_Ask

The tool is to be run from command line or batch. If you did not do so or did not supply any input file, then that message will be thrown to you. That was a small error in the code (an If statement on the wrong line) that is now fixed.

For example lets say you want to investigate what VSS has for relevant registry keys set. First unpack two packages;


WinEmb-VSS-Foundation.cab
WinEmb-VSS-Service.cab

Run the tool against the manifests inside each of the two folders and collect your newly generated registry files. This is what the complete VSS package got (when merging the reg files);

http://www.mediafire.com/file/2q2jmnfmmnq/vss_win7.reg

Far more easy to read than the xml styled manifests..

Note:

I did not say this is the complete PE answer. I said it may help solving some missing links.

@wimb

I have not done "universal" stuff lately, so I really don't currently know. Where can I read about how you implement/solved the:

"learn from booting on various hardware and automatically adjust the drivers when booting"

Any PE use readonly registry, so we must save changes on the volatile hive (in memory) to disk. Then mount the SOFTWARE/SYSTEM hive and import the changes, and finally unload the hive. Of course the tricky part is to know what to import and what not to import... Maybe only software related and other non-hardware settings..

Anyways, new improved xml2reg version; http://www.mediafire.com/file/jhynzzymxyk/xml2reg_v2.zip

Joakim

Link to comment
Share on other sites

Nothing left to solve seems like a close to complete PE build.

Sorry I don't know about the shutdown button or autologon admin. Do you really have all system services running correctly? Impressive.

Joakim

Link to comment
Share on other sites

Nothing left to solve seems like a close to complete PE build.

Sorry I don't know about the shutdown button or autologon admin. Do you really have all system services running correctly? Impressive.

Joakim

here is a small video. enough for me. i never said i will get all to work. solved background too. it can change from anywhere. services are most easy and fun to solve. others more difficult for me. can you share bitlocker registry settings too. i dont want to download all embedded for it. strange part is i removed [HKEY_LOCAL_MACHINE\SYSTEM_00\Setup]

"CmdLine"="winpeshl.exe" with explorer.exe from registry but it boots

we can make a customized win7 embedded with integrating packages and turn it to a windows 7 in such a condition will be a perfect winpe

Edited by Kullenen_Ask
Link to comment
Share on other sites

New version; http://www.mediafire.com/file/dyqnzzmj4mt/xml2reg_v3.zip

Fixed some rather unusual values found in the bluetooth package.

Beware that the string "$(runtime.system32)" is replaced with a hardcoding of "C:\\WINDOWS\\System32\" to make a valid REG_SZ key.

@Kullenen_Ask

Only the corporate version has the Bitlocker and Bitlocker to Go packages, which I don't have. But anybody with those packages should be able to generate a reg file with this tool. Sorry, can't help you.

Joakim

Link to comment
Share on other sites

@wimb

I have not done "universal" stuff lately, so I really don't currently know. Where can I read about how you implement/solved the:

"learn from booting on various hardware and automatically adjust the drivers when booting"

Learning procedure to make Universal XP:

Use BOOT_IMG.exe to Install XPRAM_1.img Image in GRUB4DOS Menu and boot from FiraDisk RAMDISK.

Let XP auto-adjust and install drivers for hardware and install some missing drivers (look in device manager)

Use IMG_XP_Update.exe to improve registry of XPRAM_1.img

Repeat the procedure by booting on various hardware with improved XPRAM_1.img from FiraDisk RAMDISK.

Each time the registry is learning and improving and next time you direct boot with improved XPRAM_1.img

More Info:

http://www.911cd.net/forums//index.php?showtopic=23553

Edited by wimb
Link to comment
Share on other sites

Do you have any ideas about shutdown button or autologon admin? my build nearly complete. nothing left to solve :D

Remove Shutdown knob from Explorer Shell Menu

[HKEY_LOCAL_MACHINE\PE3-SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoInternetOpenWith"=dword:00000001
"NoClose"=dword:00000001
"NoRecentDocsMenu"=dword:00000001
"NoRecentDocsHistory"=dword:00000001
"NoSMHelp"=dword:00000001
"NoFind"=dword:00000001

Make New Shutdown and Reboot Shortcut in ProgramData\Microsoft\Windows\Start Menu\Programs

%SystemRoot%\system32\wpeutil.exe shutdown

%SystemRoot%\system32\wpeutil.exe reboot

Thanks for the nice and impressive video's :thumbup

Edited by wimb
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...