Where is Winre.wim going?
Posted: Mon Jan 16, 2017 12:20 am
To whom this may concern,
Before I discovered your very cool and very useful wim manipulation library, I was only using Microsoft deployment tools. I had created a system by which all partitioning, operating system install, and configuration was done automatically via scripting. However, recently, I have started using wimlib for all of my wim manipulation and application needs, and only use microsoft deployment tools when I need to mount the image for offline servicing (BTW, why is mounting not supported in Windows? Makes it kind of inconvenient to have to navigate back and forth between DISM and wimlib when trying to mount and service offline images). However, ever since I started doing this, I have run into a slight hiccup in my scripting process. Part of my operating system installation process is, after the image has been applied to the partition, it copies the windows recover environment wim file (C:\windows\system32\Recovery\winre.wim) to a separate recovery partition that was created during the hard drive partitioning. However, when the script gets to this part, (and I am not sure, unfortunately, if this is only with wim files that are CREATED using wimlib or if it is any image that is APPLIED using wimlib), the Windows recovery environment wim file is missing from the applied operating system, so I have to extract the folder from a base install wim I pulled out of a operating system iso, apply the appropriate attributes to the file, then copy it to the recovery partition, and then activate it. This is really disrupting the "automation" aspect of my automated operating system deployment system. A fix would be great. I am here if you need any info from me. BTW, the image I captured with wimlib was called with the "--check" parameter just to make sure the image was ok, which I assume it would have to be... Here are the commands which perform the installation process by applying the wim and contain the point of failure. Remember, this works perfectly when using microsoft deployment tools, like DISM:
Broken:
call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
rem == Apply the image to the Windows partition ==
X:\Users\Administrator\Desktop\wimlib\wimlib-imagex.exe apply Z:\wimlibcapt.wim W:
rem == Copy boot files to the System partition ==
W:\Windows\System32\bcdboot W:\Windows /s S:
:rem == Copy the Windows RE image to the
:rem Windows RE Tools partition ==
md R:\Recovery\WindowsRE
:rem Fails right here
xcopy /h W:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\
:rem == Register the location of the recovery tools ==
W:\Windows\System32\Reagentc /Setreimage /Path R:\Recovery\WindowsRE /Target W:\Windows
:rem == Verify the configuration status of the images. ==
W:\Windows\System32\Reagentc /Info /Target W:\Windows
Works:
call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
rem == Apply the image to the Windows partition ==
dism /Apply-Image /ImageFile:Z:\wimlibcapt.wim /Index:1 /ApplyDir:W:\
rem == Copy boot files to the System partition ==
W:\Windows\System32\bcdboot W:\Windows /s S:
:rem == Copy the Windows RE image to the
:rem Windows RE Tools partition ==
md R:\Recovery\WindowsRE
xcopy /h W:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\
:rem == Register the location of the recovery tools ==
W:\Windows\System32\Reagentc /Setreimage /Path R:\Recovery\WindowsRE /Target W:\Windows
:rem == Verify the configuration status of the images. ==
W:\Windows\System32\Reagentc /Info /Target W:\Windows
Before I discovered your very cool and very useful wim manipulation library, I was only using Microsoft deployment tools. I had created a system by which all partitioning, operating system install, and configuration was done automatically via scripting. However, recently, I have started using wimlib for all of my wim manipulation and application needs, and only use microsoft deployment tools when I need to mount the image for offline servicing (BTW, why is mounting not supported in Windows? Makes it kind of inconvenient to have to navigate back and forth between DISM and wimlib when trying to mount and service offline images). However, ever since I started doing this, I have run into a slight hiccup in my scripting process. Part of my operating system installation process is, after the image has been applied to the partition, it copies the windows recover environment wim file (C:\windows\system32\Recovery\winre.wim) to a separate recovery partition that was created during the hard drive partitioning. However, when the script gets to this part, (and I am not sure, unfortunately, if this is only with wim files that are CREATED using wimlib or if it is any image that is APPLIED using wimlib), the Windows recovery environment wim file is missing from the applied operating system, so I have to extract the folder from a base install wim I pulled out of a operating system iso, apply the appropriate attributes to the file, then copy it to the recovery partition, and then activate it. This is really disrupting the "automation" aspect of my automated operating system deployment system. A fix would be great. I am here if you need any info from me. BTW, the image I captured with wimlib was called with the "--check" parameter just to make sure the image was ok, which I assume it would have to be... Here are the commands which perform the installation process by applying the wim and contain the point of failure. Remember, this works perfectly when using microsoft deployment tools, like DISM:
Broken:
call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
rem == Apply the image to the Windows partition ==
X:\Users\Administrator\Desktop\wimlib\wimlib-imagex.exe apply Z:\wimlibcapt.wim W:
rem == Copy boot files to the System partition ==
W:\Windows\System32\bcdboot W:\Windows /s S:
:rem == Copy the Windows RE image to the
:rem Windows RE Tools partition ==
md R:\Recovery\WindowsRE
:rem Fails right here
xcopy /h W:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\
:rem == Register the location of the recovery tools ==
W:\Windows\System32\Reagentc /Setreimage /Path R:\Recovery\WindowsRE /Target W:\Windows
:rem == Verify the configuration status of the images. ==
W:\Windows\System32\Reagentc /Info /Target W:\Windows
Works:
call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
rem == Apply the image to the Windows partition ==
dism /Apply-Image /ImageFile:Z:\wimlibcapt.wim /Index:1 /ApplyDir:W:\
rem == Copy boot files to the System partition ==
W:\Windows\System32\bcdboot W:\Windows /s S:
:rem == Copy the Windows RE image to the
:rem Windows RE Tools partition ==
md R:\Recovery\WindowsRE
xcopy /h W:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\
:rem == Register the location of the recovery tools ==
W:\Windows\System32\Reagentc /Setreimage /Path R:\Recovery\WindowsRE /Target W:\Windows
:rem == Verify the configuration status of the images. ==
W:\Windows\System32\Reagentc /Info /Target W:\Windows
