WinPE can't locate Image to install after Sysprep

Discussion in 'Windows 8' started by ceo54, Sep 30, 2018.

  1. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    867
    360
    30
    Hello,

    Since the mainstream support for 8.1 ended this month, I decided to make a custom ISo for one last time, including August Rollup. I did a few things in the audit mode, most of which were tested methods so no issues there but also I changed Windows default aero theme with my 3rd party theme after Sysprep through mounting the image offline. I took extreme care in replacing all the related files .msstyles ,.theme and shellstyle.dll (System is already patched to accept 3rd party themes)

    Two other new things that I did in Audit mode is I removed the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\DefaultColors and I created SetupComplete.cmd in Windir\Setup\Scripts and included the following command in it powercfg /hibernate off

    After this I captured the image using winscript.ini (attached below) and when I did a first test run, using answer file, windows PE reported that I don't have any image in the index to install. So next again captured the image, this time without using the exclusion list and ran the installation without the answer file. After I enterted the key, Win PE again gave an error stating that the key entered does not correspond to any of the image available. I'm 100% confident I didn't make any mistake with the key.

    Can anyone please point out what might have caused this error to occur ? And how can I use my 3rd party theme as default instead of Aero ? I read discussion on technet someone mentioning to change the paths in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ThemeManager \ DLLName And HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes \ InstallTheme \ InstallVisualStyle to a custom theme that should work. I haven't tried this method though.

    And lastly, during the mount, I looked up in the Windir\setup folder and there was no Scripts folder there. I investigated and found the if the OEM key is used, windows 8 does not run Setupcomplete.cmd. So how can I disable Hibernate from within the windows, without requiring the answer file pass ?

    Any help will be greatly appreciated.

    Thank you for reading.

    Edit : wimscript.ini
    Code:
    [ExclusionList]
    $Recycle.Bin
    $Windows.~BT
    $Windows.~WS
    Recycler
    Recycled
    \PerfLogs
    PerfLogs
    System Volume Information
    swapfile.sys
    hiberfil.sys
    pagefile.sys
    winpepge.sys
    \$ntfs.log
    \hiberfil.sys
    \pagefile.sys
    \swapfile.sys
    \winpepge.sys
    "\System Volume Information"
    \RECYCLER
    \Windows\Temp\
    \Windows\Logs\
    \Windows\Prefetch
    \Windows\CSC
    \Windows\CbsTemp\
    \Windows\WinSxS\ManifestCache\
    \Program Files\WindowsApps\Deleted\
    \Program Files\WindowsApps\DeletedAllUserPackages\
    \ProgramData\Microsoft\Windows\WER\
    \ProgramData\Microsoft\Windows\Caches\
    \Boot
    \Recovery
    \Recovery.txt
    \BOOTSECT.BAK
    \ProgramData\Microsoft\Network\Downloader\*
    \Users\Administrator
    \Windows\debug\*
    \Windows\inf\*.etl
    \Windows\inf\*.log
    \Windows\Logs\CBS\*
    \Windows\Logs\DISM
    \Windows\Logs\DPX
    \Windows\Logs\PBR
    \Windows\Logs\DirectX.log
    \Windows\Panther
    \Windows\Prefetch
    \Windows\security\database\*.chk
    \Windows\security\database\*.log
    \Windows\security\database\*.jrs
    \Windows\ServiceProfiles\LocalService\AppData\Local\FontCache-S-1-5-21-*.dat
    \Windows\System32\catroot2\*.chk
    \Windows\System32\catroot2\*.log
    \Windows\System32\catroot2\*.jrs
    \Windows\System32\CodeIntegrity\bootcat.cache
    \Windows\System32\Sysprep\Panther
    \Windows\System32\Sysprep\Sysprep_succeeded.tag
    \Windows\System32\winevt\Logs\*
    \Windows\Temp\*
    \Windows\WinSxS\ManifestCache\*
    \Windows\WinSxS\Temp\PendingDeletes\*
    \Windows\DtcInstall.log
    \Windows\PFRO.log
    \Windows\setupact.log
    \Windows\setuperr.log
    \Windows\TSSysprep.log.log
    \Windows\vmgcoinstall.log
    \Windows\WindowsUpdate.log
    \Users\*\AppData\Local\Temp\
    \Users\*\AppData\Local\Microsoft\Windows\Explorer\
    \Users\*\AppData\Local\Microsoft\Windows\INetCache\
    \Users\*\AppData\Local\lxss
    \Users\*\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\
    \Users\*\OneDrive
    Can anyone please also check the wimscript and see if there's any entry which I shouldn't use.

    Thank you for anyone who appears in my thread.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,186
    84,650
    340
    Did you set the new install.wim edition flag?
    you need imagex.exe
    Code:
    imagex /flags "CoreSingleLanguage" /check /info install.wim 1 "Windows 8.1 Single Language" "Windows 8.1 Single Language"
    
     
  3. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    867
    360
    30
    Thank for showing up abbodi. I can't complete this without your expert help. Okay so I started the download for the development tools from Win ADK. But I have some questions

    1: I did this capture thing like 20 times before never needed the edition flag. What's special this time around ?

    2. If I capture from imagex, what would be the compression settings it use ? I want the image to be as slim as possible. With dism, I use compression:maximum switch.

    3. The method I mentioned in the original post for changing the theme, is it okay to do that way ? or should I take the registry road ?

    4. The key that I use, I grabbed from internet and is probably OEM so that means I can't use SetupComplete.cmd This leaves me to disable the hibernation through the registry for which I would need to use the unattended to copy the profile in sysprep. I haven't done this before. Can you tell me what I need to put in the unattended to copy the temporary Admin profile to default profile please ?

    Your help is highly appreciated. Thanks man.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,186
    84,650
    340
  5. ceo54

    ceo54 MDL Addicted

    Aug 13, 2015
    867
    360
    30
    Setting the edition flag sorted out the problem. Thank you very much aboddi. Without your help, I would have never known what really went wrong, much less how to sort it out.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...