capture wim compatible with windows7 setup.exe

Comments, questions, bug reports, etc.
synchronicity
Site Admin
Posts: 474
Joined: Sun Aug 02, 2015 10:31 pm

Re: capture wim compatible with windows7 setup.exe

Post by synchronicity »

Hi,

In wimlib-1.9.0-BETA3 (I'm renaming 1.8.4 to 1.9.0) I've implemented setting the Windows-specific XML information.

The information for an image is automatically set when the image is captured. Not supported yet is updating the information for an existing image; this could be added later, relatively easily, if desired.

Overall, the method of setting the data is similar to JFX's code where the information is gathered from the SYSTEM and SOFTWARE registry hives, and kernel32.dll. But there are some differences, and I am not relying on any 3rd party code. There are lots of "hacks", but it works exactly the same on Linux and Windows, regardless of capture mode.

Thanks to both k3dar7 and JFX for suggestions and examples!

Let me know how it works for you if you have time to test it.

- synchronicity
JFX
Posts: 40
Joined: Tue Aug 18, 2015 3:59 pm

Re: capture wim compatible with windows7 setup.exe

Post by JFX »

Great, looks very good so far.

Two things noticed.

ARM64 architecture is not supported.

Code: Select all

#define IMAGE_FILE_MACHINE_ARM64 0xaa64

#define PROCESSOR_ARCHITECTURE_ARM64	12
Also Systemroot seams to be hardcoded to "Windows".
WinPE and older Windows version can have custom names for the Windows folder.
synchronicity
Site Admin
Posts: 474
Joined: Sun Aug 02, 2015 10:31 pm

Re: capture wim compatible with windows7 setup.exe

Post by synchronicity »

I'll add ARM64.

What are some examples of typical alternate system roots? Are they typically at the top level only? I'd like to avoid iterating through all files in the image to find the root.
JFX
Posts: 40
Joined: Tue Aug 18, 2015 3:59 pm

Re: capture wim compatible with windows7 setup.exe

Post by JFX »

Typical systemroot for older windows version are

\WINNT
\I386
\AMD64

Technicality windows folder can be a non top level folder like "\$windows.~bt\Windows",
but as far as I now imagex / wimgapi only support a folder direct in the root of a drive.
bliblubli
Posts: 88
Joined: Thu Dec 31, 2015 10:45 am

Re: capture wim compatible with windows7 setup.exe

Post by bliblubli »

Does someone have a good workflow example of how to make a live system installable from a USB key (after capturing with the new --snapshot example)?
k3dar7
Posts: 6
Joined: Tue Dec 15, 2015 5:57 pm

Re: capture wim compatible with windows7 setup.exe

Post by k3dar7 »

hi, synchronicity

image created and all is auto filled (xml windows elements and also flags) :)

compare with info from image saved using ImageX i see only diference:
using wimlib-1.9.0-BETA5 => Product Name: Windows 7 Home Premium
using ImageX under WinPE3 => Product Name: Microsoft® Windows® Operating System
(btw: this value is not used by setup.exe)

and only detail, using wimlib is moreover :)
Display Name: Windows 7 Home Premium
Display Description: Windows 7 Home Premium

many thx :)
bliblubli
Posts: 88
Joined: Thu Dec 31, 2015 10:45 am

Re: capture wim compatible with windows7 setup.exe

Post by bliblubli »

@k3dar7 so you make a snapshot with wimlib, and replace the original install.wim with the one from wimlib on the installation media ? Or is it more complicated ?
k3dar7
Posts: 6
Joined: Tue Dec 15, 2015 5:57 pm

Re: capture wim compatible with windows7 setup.exe

Post by k3dar7 »

bliblubli wrote:@k3dar7 so you make a snapshot with wimlib, and replace the original install.wim with the one from wimlib on the installation media ? Or is it more complicated ?
only little more complicated...
1. on running windows system run: sysprep /oobe /generalize /shutdown (this remove hw dependent configurations and prepare for deploying)
2. boot linux and capture using wimlib >=1.9
3. extract install medium, replace install.wim, recreate install medium

i don't know if this work without sysprep and/or capturing from running windows using snapshot...
bliblubli
Posts: 88
Joined: Thu Dec 31, 2015 10:45 am

Re: capture wim compatible with windows7 setup.exe

Post by bliblubli »

ok, good thank you for your solution :) I'll test without sysprep and from windows then and report if successful. Oh and default LZX compression works for an install.wim ?
synchronicity
Site Admin
Posts: 474
Joined: Sun Aug 02, 2015 10:31 pm

Re: capture wim compatible with windows7 setup.exe

Post by synchronicity »

Yes. The compression formats that work with all versions of Microsoft's software are LZX and XPRESS with 32768 byte chunks. wimlib defaults to the former.
Post Reply