Append/Capture from Linux for Rollout via Setup.exe fails

  • Detlef Oertel

    Detlef Oertel - 2014-06-03


    first of all: thank you for this wonderful piece of software.

    I try to capture a syspreped windows into a install.wim for a later roll out via the original MS setup.exe
    (which works fine using MS imagex/dism).

    I use the linux version (1.6.2) on a ubuntu 12.04 based bootimage.
    The capture and append process works without error messages and ends with exitcode 0 using a command like this:

    export WIMLIB_IMAGEX_USE_UTF8=on ; wimlib-imagex append /dev/sda1 /mnt/wim/win81-x64/installfiles/sources/install.wim
    "capture" "my description" --flags="Professional" --check

    But running the setup.exe the image named 'capture' is not found in the install.wim.

    Using the 'wimlib-imagex info' shows the image 'capture' but with less meta data than the original or by dism captured
    images as you can see in the difference between image 1 (visible for setup.exe) and image 3 ('wimlib-imagex append' not
    accepted by setup.exe) from the following output:

    Available Images:

    Index: 1
    Name: Windows 8.1 Pro N
    Description: Windows 8.1 Pro N
    Display Name: Windows 8.1 Pro N
    Display Description: Windows 8.1 Pro N
    Directory Count: 17517
    File Count: 78163
    Total Bytes: 11914356128
    Hard Link Bytes: 5081232971
    Creation Time: Thu Aug 22 23:43:12 2013 UTC
    Last Modification Time: Thu Aug 22 23:43:46 2013 UTC
    Architecture: x86_64
    Product Name: Microsoft« Windows« Operating System
    Edition ID: ProfessionalN
    Installation Type: Client
    HAL: acpiapic
    Product Type: WinNT
    Product Suite: Terminal Server
    Languages: de-DE
    Default Language: de-DE
    System Root: WINDOWS
    Major Version: 6
    Minor Version: 3
    Build: 9600
    Service Pack Build: 16384
    Service Pack Level: 0
    Flags: ProfessionalN


    Index: 3
    Name: capture
    Description: my description
    Directory Count: 21126
    File Count: 90474
    Total Bytes: 16917172182
    Hard Link Bytes: 5456845673
    Creation Time: Tue Jun 03 06:23:39 2014 UTC
    Last Modification Time: Tue Jun 03 06:23:43 2014 UTC
    Flags: Professional

    Any ideas how to make the captured images useful for the roll out via setup.exe ?

    Thank you in advance.


    Last edit: Detlef Oertel 2014-06-04
  • synchronicity

    synchronicity - 2014-06-04


    wimlib currently does not set Windows-specific XML data. As far as I know, this information can only be obtained by reading registry keys or by parsing an executable file in the captured image. Both of these would be difficult, especially from non-Windows systems.

    Perhaps there's some way to get Window Setup to use the WIM image regardless of this information? None of XML data, including the Windows-specific information, is supposed to have any effect on extraction, as far as I know. Also, normally images in WIM files are specified by 1-based index or by name.

    Also note that you can could wimlib to apply the image instead of relying on Windows Setup. This works from both Linux and Windows.

  • Detlef Oertel

    Detlef Oertel - 2014-06-04


    thank you for the fast reply.

    My work is part of the open source client management project opsi (
    For the Windows deployment we user the standard MS unattended install: setup.exe with a unattend.xml as answer file. This answer file contains the name of the image but a by wimlib captured image is ignored (like giving a non existent name). We make intensive use of other features of the unattended installation like automatic driver integration and post installation activities, so that the use of wimlib_apply not an option is for us (at the moment).
    How ever - even if it not works to deploy wimlib captured images by setup.exe, wimlib will help us in other parts of our work.

    So thank you again.


  • synchronicity

    synchronicity - 2014-06-05


    Glad to hear it's still useful to you. However when I have time I might look further into this issue and see if there's anything I can do to fix it without too much trouble. It's a shame that Microsoft doesn't have better documentation! (And error messages --- it shouldn't tell you the image doesn't exist when the problem is something else...)


  • synchronicity

    synchronicity - 2014-06-11

    I found that Windows Setup (for Windows 7) recognizes the image if only the the ARCH and SYSTEMROOT elements in the XML data are set, in addition to FLAGS which already can be set. But I bet it looks at the other stuff later during the setup process, and it could be important.

    I don't think this info can be reliably obtained from anywhere other than the Windows registry, and I wouldn't be super excited to add a full-blown Windows registry parser to the project so that it works on non-Windows systems.

    The only alternative I can think of is to add a way to provide custom XML data for images. Even this would be a little difficult and not too user-friendly, though; you'd basically have to specify a fairly complicated XML file like this...:

    <NAME>Windows 7 ULTIMATE</NAME>
    <DISPLAYNAME>Windows 7 Ultimate</DISPLAYNAME>
      <PRODUCTNAME>Microsoft&#xAE; Windows&#xAE; Operating System</PRODUCTNAME>

    Let me know if you have any other ideas.

    Last edit: synchronicity 2014-06-11

Log in to post a comment.