Topic: Dots, dot dots, and WIM extraction  (Read 1953 times)

Dots, dot dots, and WIM extraction
« on: February 08, 2014, 05:48:26 PM »

JonF

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2011
  • Posts: 291
I found an error in the WIM extraction script batch file. I'm not sure if it affects the operation of the script but it's certainly inelegant. There's similar stuff in the WIM extraction of in Win8PE_SE and Win8.1PE but it doesn't seem to be causing the error.

Extract_WIM.cmd uses an environment variable "z" to track whether the 64 bit version or the 32 bit version of 7-zip is used. This variable is either ".\x64\7zg.exe" or ".\x86\7zg.exe". This is a little strange because there is no reason to include the ".\".  But later when 7-zip is invoked later the current directory has been changed to "wiminfo" and invoking 7-zip with that command fails and pops up the attached error.

There's several ways this could be fixed, but here's how I would do it:

Lines 101-102 and 504-505
Code: [Select]
Set z=x86\%zexe%
If %PROCESSOR_ARCHITECTURE%==AMD64 Set z=x64\%zexe%

Lines 514-515:
Code: [Select]
IF EXIST "%SourceDir%\Tools\PETools\%SourceType%\winpe.wim" wiminfo.exe "..\%z%" "%SourceDir%\Tools\PETools\%SourceType%\winpe.wim" "%WimInfoInstall%"
IF EXIST "%SourceDir%\sources\install.wim" wiminfo.exe "..\%z%" "%SourceDir%\sources\install.wim" "%WimInfoInstall%"

I'm also not a big fan of the "pause" on line 468 because it requires interaction to end the script.

Re: Dots, dot dots, and WIM extraction
« Reply #1 on: February 08, 2014, 07:49:40 PM »

JonF

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2011
  • Posts: 291
Whoops, forgot the attachment.

Re: Dots, dot dots, and WIM extraction
« Reply #2 on: February 13, 2014, 04:42:27 PM »

ChrisR

  • XPE Baker
  • Grand Chef
  • *****
  • Date Registered: Mar 2011
  • Posts: 3494
With some delay, It is done now, Thanks JonF  :thumbsup: 

The compact option is optional now. It seems that with Ramdisk and SSD, it can be a bit slower with compressed wim folders  :wink:
For Win8, Take Ownership of Wim folders is now optional also with a big time saver  :cool:
In order to easily delete these folder  by users when desired, SetAcl is copied in sources\boot_wim (and install_wim) and 2 small batchs are created in these folders


TakeOwnerShip_boot_wim.cmd (or TakeOwnerShip_install_wim.cmd)
Code: [Select]
@Echo Off
Echo.
Echo Take OwnerShip and Grant full access of
Echo E:\Windows\Win8Pro32\sources\boot_wim
Echo.
Echo Take Ownership , Be patient .....
SetAcl.exe -ot "file" -on "..\boot_wim" -rec cont_obj -actn setowner -ownr "n:S-1-1-0;s:y" -silent
Echo.
Echo Grant full access , Be patient .....
SetAcl.exe -ot "file" -on "..\boot_wim" -rec cont_obj -actn ace -ace "n:S-1-1-0;p:full;s:y" -silent

Rights can be changed manually, of course.
Then you can delete these folders when you wish   :smile:

 

Powered by EzPortal