Page 2 of 4

Re: capture wim compatible with windows7 setup.exe

Posted: Fri Jan 01, 2016 6:27 pm
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

Re: capture wim compatible with windows7 setup.exe

Posted: Sat Jan 02, 2016 8:45 pm
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.

Re: capture wim compatible with windows7 setup.exe

Posted: Sat Jan 02, 2016 10:37 pm
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.

Re: capture wim compatible with windows7 setup.exe

Posted: Sat Jan 02, 2016 11:05 pm
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.

Re: capture wim compatible with windows7 setup.exe

Posted: Sun Jan 03, 2016 9:21 pm
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)?

Re: capture wim compatible with windows7 setup.exe

Posted: Tue Jan 05, 2016 1:23 pm
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 :)

Re: capture wim compatible with windows7 setup.exe

Posted: Tue Jan 05, 2016 7:17 pm
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 ?

Re: capture wim compatible with windows7 setup.exe

Posted: Wed Jan 06, 2016 12:25 am
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...

Re: capture wim compatible with windows7 setup.exe

Posted: Wed Jan 06, 2016 9:19 pm
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 ?

Re: capture wim compatible with windows7 setup.exe

Posted: Fri Jan 08, 2016 1:39 am
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.