capture wim compatible with windows7 setup.exe
capture wim compatible with windows7 setup.exe
if capture windows7 installation from hdd to wim (on linux, using wimlib-1.8.3), then is not compatible with windows 7 setup.exe
same problem as here, where you find that setup.exe need defined elements ARCH and SYSTEMROOT (and maybe others missed)...
is please any chance to implement to wimlib any way for compatibility with setup.exe ?
- option to capture wim with read xml from external file
- or define ARCH, SYSTEMROOT (and others) with command line parameters as --flags EDITION_ID: --windows-arch x86 --windows-systemroot WINDOWS ?
- or ARCH detect if exists /Windows/SysWOW64 dir then x86_64, if not then x86? and SYSTEMROOT detect root dir where exist explorer.exe?
- or maybe if some info is readable from registry on SOURCE, then use this value auto, maybe using external libhivex?
http://libguestfs.org/hivex.3.html
http://libguestfs.org/virt-inspector.1. ... tingsystem
thx for answer, and of course for all your work
same problem as here, where you find that setup.exe need defined elements ARCH and SYSTEMROOT (and maybe others missed)...
is please any chance to implement to wimlib any way for compatibility with setup.exe ?
- option to capture wim with read xml from external file
- or define ARCH, SYSTEMROOT (and others) with command line parameters as --flags EDITION_ID: --windows-arch x86 --windows-systemroot WINDOWS ?
- or ARCH detect if exists /Windows/SysWOW64 dir then x86_64, if not then x86? and SYSTEMROOT detect root dir where exist explorer.exe?
- or maybe if some info is readable from registry on SOURCE, then use this value auto, maybe using external libhivex?
http://libguestfs.org/hivex.3.html
http://libguestfs.org/virt-inspector.1. ... tingsystem
thx for answer, and of course for all your work
Re: capture wim compatible with windows7 setup.exe
Maybe just creating a Windows program that extend the XML information later or when needed.
It should be easy using the new wimlib_set_image_property() function.
Just one problem, how to deal with multi language Images?
I mean, howto set 2 or more languages, they seam to have the same node name:
It should be easy using the new wimlib_set_image_property() function.
Just one problem, how to deal with multi language Images?
I mean, howto set 2 or more languages, they seam to have the same node name:
Code: Select all
<LANGUAGES>
<LANGUAGE>de-DE</LANGUAGE>
<LANGUAGE>en-US</LANGUAGE>
<DEFAULT>de-DE</DEFAULT>
</LANGUAGES>
-
- Site Admin
- Posts: 474
- Joined: Sun Aug 02, 2015 10:31 pm
Re: capture wim compatible with windows7 setup.exe
Hi,
Those are all good ideas. But I think the most user friendly way would be to have the info set automatically when you create a WIM image, like what WIMGAPI does. I'll look into it more when I have time.
wimlib_set_image_property() and wimlib_get_image_property() don't yet support multiple same-named child elements at the same level. But I reserved the '[' character in case I decide to add support for it later via property names like "WINDOWS/LANGUAGES/LANGUAGE[2]".
- synchronicity
Those are all good ideas. But I think the most user friendly way would be to have the info set automatically when you create a WIM image, like what WIMGAPI does. I'll look into it more when I have time.
wimlib_set_image_property() and wimlib_get_image_property() don't yet support multiple same-named child elements at the same level. But I reserved the '[' character in case I decide to add support for it later via property names like "WINDOWS/LANGUAGES/LANGUAGE[2]".
- synchronicity
Re: capture wim compatible with windows7 setup.exe
Sure for user friendly way is ideal automatically, but is please possible before you try implement this, try implement (if is easy for you) any user total unfriendly, but working way ?
With only one language element is not problem. I have some original "Dell MUI Windows7" (Pro, Home, 32, 64) installation where install.wim have defined only en-US language element and instalation work fine with selecting language via pulldownmenu(without unattented file)... Only image with multiple language element that i have is "HewlettPackard MUI Windows7"... Anyway when install from this mediums is selected one language, on HDD is installed files for only this one language and capture this HDD using MS ImageX on WinPE language is defined too only for this one language...
I think, in normal way is not posilble install MUI to HDD and capture is back as MUI, and if anyone try this with some abnormal way, still is not required multiple language xml element in install.wim for working multilanguage instalation using original setup.exe...
With only one language element is not problem. I have some original "Dell MUI Windows7" (Pro, Home, 32, 64) installation where install.wim have defined only en-US language element and instalation work fine with selecting language via pulldownmenu(without unattented file)... Only image with multiple language element that i have is "HewlettPackard MUI Windows7"... Anyway when install from this mediums is selected one language, on HDD is installed files for only this one language and capture this HDD using MS ImageX on WinPE language is defined too only for this one language...
I think, in normal way is not posilble install MUI to HDD and capture is back as MUI, and if anyone try this with some abnormal way, still is not required multiple language xml element in install.wim for working multilanguage instalation using original setup.exe...
-
- Site Admin
- Posts: 474
- Joined: Sun Aug 02, 2015 10:31 pm
Re: capture wim compatible with windows7 setup.exe
Hi,
In wimlib v1.8.4-BETA1 (just posted) I have extended the ability to set information in the WIM file's XML document. There are two changes:
1.) The wimlib_{get,set}_image_property() API functions were updated to allow the use of bracketed indices such as "WINDOWS/LANGUAGES/LANGUAGE[2]". This can be used to handle cases where a single element has multiple children with the same name.
2.) A new '--image-property' option was added to the "capture", "append", and "info" subcommands of wimlib-imagex.
This should allow you to set the necessary information, provided you know the element names and values to use.
I am still planning to investigate further having the Windows-specific information set automatically when possible.
- synchronicity
In wimlib v1.8.4-BETA1 (just posted) I have extended the ability to set information in the WIM file's XML document. There are two changes:
1.) The wimlib_{get,set}_image_property() API functions were updated to allow the use of bracketed indices such as "WINDOWS/LANGUAGES/LANGUAGE[2]". This can be used to handle cases where a single element has multiple children with the same name.
2.) A new '--image-property' option was added to the "capture", "append", and "info" subcommands of wimlib-imagex.
This should allow you to set the necessary information, provided you know the element names and values to use.
I am still planning to investigate further having the Windows-specific information set automatically when possible.
- synchronicity
Re: capture wim compatible with windows7 setup.exe
hi,
seem it work setup.exe now installed fine from image captured using:
wimlib-imagex capture /dev/nbd0p2 install.wim "Windows 7 PROFESSIONAL" "Captured using wimlib" --compress=fast --check --flags "Professional" \
--image-property WINDOWS/SYSTEMROOT="WINDOWS" --image-property WINDOWS/ARCH="0"
(based on "wimlib-imagex info captured_with_ms_imagex.wim -xml" arch x86 is value 0, arch x86_64 is value 9)
and what more... size of this captured image (from identical source partition) is 10% smaller and 7x faster that using "MS ImageX under WinPE"
many thanks !
seem it work setup.exe now installed fine from image captured using:
wimlib-imagex capture /dev/nbd0p2 install.wim "Windows 7 PROFESSIONAL" "Captured using wimlib" --compress=fast --check --flags "Professional" \
--image-property WINDOWS/SYSTEMROOT="WINDOWS" --image-property WINDOWS/ARCH="0"
(based on "wimlib-imagex info captured_with_ms_imagex.wim -xml" arch x86 is value 0, arch x86_64 is value 9)
and what more... size of this captured image (from identical source partition) is 10% smaller and 7x faster that using "MS ImageX under WinPE"
many thanks !
Re: capture wim compatible with windows7 setup.exe
Works nice now, adding multiple language information.
I made a console program that should detect all stuff and updates the wim.
http://1drv.ms/1Pg0sTG
BTW: What's the most efficient way to tell, if image file exist?
I made a console program that should detect all stuff and updates the wim.
http://1drv.ms/1Pg0sTG
BTW: What's the most efficient way to tell, if image file exist?
-
- Site Admin
- Posts: 474
- Joined: Sun Aug 02, 2015 10:31 pm
Re: capture wim compatible with windows7 setup.exe
@JFX
Great to hear that you were able to build a working program! Does it obtain all its information from the registry, or are there other sources of information as well?
With regards to your question: If you are referring to determining whether a file is, in fact, a WIM file, wimlib doesn't provide any faster way than calling wimlib_open_wim(). Alternate methods which would be faster but wimlib doesn't support directly would be (1) just checking for a .wim extension, or (2) checking the first 8 bytes of the file for the magic bytes "MSWIM\0\0\0". wimlib_open_wim() does check the magic bytes, but it does quite a few other things as well.
If you are referring to determining whether a WIM file has an image of a given index, just call wimlib_get_wim_info() on the WIMStruct to get the number of images; the images are always numbered 1...image_count.
Great to hear that you were able to build a working program! Does it obtain all its information from the registry, or are there other sources of information as well?
With regards to your question: If you are referring to determining whether a file is, in fact, a WIM file, wimlib doesn't provide any faster way than calling wimlib_open_wim(). Alternate methods which would be faster but wimlib doesn't support directly would be (1) just checking for a .wim extension, or (2) checking the first 8 bytes of the file for the magic bytes "MSWIM\0\0\0". wimlib_open_wim() does check the magic bytes, but it does quite a few other things as well.
If you are referring to determining whether a WIM file has an image of a given index, just call wimlib_get_wim_info() on the WIMStruct to get the number of images; the images are always numbered 1...image_count.
Re: capture wim compatible with windows7 setup.exe
Yes, all information are collected from kernel32.dll, system and software registry hive.
Source code included now.
Sorry my question was a unclear. I mean is there a way quick way to detect a file exists inside a given index of a wimfile.
Something like wimgapis WIMCreateImageFile() or WIMFindFirstImageFile()
Source code included now.
Sorry my question was a unclear. I mean is there a way quick way to detect a file exists inside a given index of a wimfile.
Something like wimgapis WIMCreateImageFile() or WIMFindFirstImageFile()
-
- Site Admin
- Posts: 474
- Joined: Sun Aug 02, 2015 10:31 pm
Re: capture wim compatible with windows7 setup.exe
Currently, the best way to check for a file's existence is to use wimlib_iterate_dir_tree(). Pass in the image index, the path to the file, 0 for the flags, and a no-op callback. If it returns 0, then the file exists; if it returns WIMLIB_ERR_PATH_DOES_NOT_EXIST, then the file doesn't exist.