Capturing an Image(wim) W7, W8.1, W10 1809.

Clanger

Well-Known Member
I want to capture a custom w7 wim. I will manually install kb3125574 etc(later captures will include .net462) so that everthing is installed and nothing is pending etc.

X:\Windows\SoftwareDistribution is where all the updates crap is but are there any other folders i need to manually clean out before capture?

What is the maximum amount of image captures you should make? i am hoping for 1 capture, drag into NTLite, shrink and tweak, install. Capture(not sure yet) no2 would be for selected programs to be included on the wim.
 
Last edited:

abbodi86

Member
Sysprep automatically should remove SoftwareDistribution folder
consider using wimscript.ini to exclude folder/files from capture
e.g.
Code:
[ExclusionList]
\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\servicing\Packages\wuindex.xml
\Windows\SoftwareDistribution
\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
 

Clanger

Well-Known Member
Thank you :). GImageX has an option for wimscript.ini location on its Capture page.
 
Last edited:

ahazuarus

Member
What is the maximum amount of image captures you should make
I remember reading that Microsoft officially supports sysprep capture one single time. 3 times before sysprep bricks your system unless you set a deprecated option the answer file you pass to sysprep.

https://system-center.me/miscellaneous/sysprep-your-windows-os-for-more-then-3-times/

I use virtualbox or hyper-v and take a snapshot before triggering sysprep. Then I simply mount the relevant snapshot in Disc Management (read only) and capture with GimageX.

I go back to the virtual machine and revert to previous state to continue making changes/updates whatever. This way, sysprep is never really run more than one time. The idea being making as few changes as technologically possible to prevent introducing problems into the image, sysprep changes a huge amount of data each time it is run.

Occasionally, I will clone a virtual machine disc image to "branch" off and try different things so I can wonder further away from by original "stable" image without fear of breaking something.

And still yet, occasionally, scrap everything on a particular OS version/edition and start over from a clean install entirely from an original image and just retrace my steps. Doing this, I find myself leaving things out that is no longer needed or used resulting in a cleaner leaner image.
 

Kasual

Well-Known Member
Regardless the Rearm count, Windows 8.1 has 100, but sysprep is only supported 8 times
The process is different, rearm is a reset counter and sysprep is not jus a count reset, it makes changes. Less reset times means less support calls and easier troubleshoot for the support assistant.
 

Clanger

Well-Known Member
Pc no2(new workstation) now up and running. Just gotta do a little preparation and testing 1st then custom wim here we come. :)
 

jwatson2323

New Member
Just to add to this, you can sysprep as many times as you want so long as Windows is running sysprep in audit mode.
So ideally you want to enter this on the very first OOBE screen before doing any updating etc. Hit CTRL+SHIFT+F3 at the OOBE screen to enter audit mode. Do all your updating etc and sysprep the image. This is also good practice because no local accounts will need to be created.
If you need to re-access the image, simply enter audit mode again at the OOBE. You can do this as many times as you wish without hitting the limit on syspreps.
 

Clanger

Well-Known Member
OK, did a clean(untouched iso) install, added 3125574(and prerequisites), did some tweaking, tried to sysprep. Sysprep complained, "fatal error" or similar, probably due to the tweaking so i am going to try a different approach.

Target PC is my offline workstation so i dont need to load hundreds of updates, i want stable, a single run through ntlite(if possible), integrate .net472.

This is my integration list,
01-2016-07-27-Windows6.1-KB3177467-x64-SS.msu
02-2016-04-25-Windows6.1-KB3125574-v4-x64-SP2.msu
03-2016-03-29-Windows6.1-KB3145739-x64.msu
04-2016-04-10-Windows6.1-KB3153199-x64.msu
05-NET-Framework-4.7.2-x86-x64.exe - Contains KB4019990
06-Windows6.1-KB4019990-x64.msu
06-Windows6.1-KB4095874-x64.msu

I can integrate 1 to 4 easily on the Updates page and any .msu file but what about the net472 exe, then its 2 .msu updates that have to be installed after?

I would prefer to add them all to the setup stage, i take it i would need to add silent switches,
filename.msu /quiet /norestart for the msu files,
filename.exe /q /norestart for the net472 executable.

Is it better to let the setup restart when needed and just use the /quiet switches?

What is the best option, add everything to Updates, add 1 to 4 to Updates and 5 to 7 to Post Setup or add everything to Post Setup then Sysprep at the OOBE page. I dont care how long it takes to install and update, i prefer whatever gives the better more accurate result.

The OOBE page, thats the enter Username PC name page yes?
 
Last edited:

Kasual

Well-Known Member
Is it better to let the setup restart when needed and just use the /quiet switches?

The OOBE page, thats the enter Username PC name page yes?
I would do the /quiet switches and for the other question, yes, OOBE is for entering name and PC name (if not preselected, these too: language options, calendar & time, updates, connect to a wifi network, windows update settings and i think that's it for 7).

The execution order is as follows:
OOBE
SetupComplete.cmd
autounattend.xml

I hope that helps you a bit.
 

Clanger

Well-Known Member
Thanks Kasual, i read summat from Nuhi yesterday so i am gonna do 1to4 in the usual way and 5to7 Post Setup with the quiet switches and sysprep at oobe. I need an updated(3125574) image anyway. Thanks bud :).

Hmm, NTLite adds the switches, nice, removed the no restart though. I saves the $OEM$ folder for later. :)
 
Last edited:

Clanger

Well-Known Member
Last question, Can NTLite force sysprep at the oobe stage?

Unattended - Windows Setup and Deployment - Reseal - Mode - Do i select Audit and will this shutdown the pc ready for capture?

All going well i will finish this all today. :)
 

nuhi

NTLite developer
Staff member
Last question, Can NTLite force sysprep at the oobe stage?

Unattended - Windows Setup and Deployment - Reseal - Mode - Do i select Audit and will this shutdown the pc ready for capture?

All going well i will finish this all today. :)
Yes, if you choose Audit, it will boot into that after setup with I believe sysprep automatically opened.
After you're done settings things up, there is the Sysprep generalize option with shutdown.
You should be able to reboot before closing it.
 

Clanger

Well-Known Member
Nuhi, need to pick your brains on this one. My new v3 lite preset shows 3.6xxgb using 3125574 and prequisites only. Using the same preset on the captured wim above that has net472 integrated aswell the final image is 500mb larger. I would accept 250mb but 500 seems a bit too much, is that because it is a snapshot of a running system once everything is installed?

I didnt do any cleanups before capture, nothing because when i tried to sysprep earlier captures i was doing additional stuff which prolly caused the sysprep fatal error.

If you and Abbodi tell me that is about right then fine, i defer to greater knowledge. If it looks a bit off to you guys then i dont mind looking at extra cleanups. :)
 
Last edited:

Clanger

Well-Known Member
Some good news. Although i havnt got round to the post setup .net install problem a test captured wim(.net manually installed post 1st logon) that had a basic ntlite cleanup is 6.6gb installed, thats with net472 and 3125574 integrated. :) And its proving to be very stable too :cool:
 

Clanger

Well-Known Member
Now i have got my head around wim capture with GimageX i want to ask another question.

Capture with ImageX or DISM? I am not fluent with the command line or dism so i used DISMGUI. It looks like i cant create a new wim file, just append an existing one. There isnt an option for a wimscript file so will dism capture everything including the recycle bin and System Volume Information?

Once i have got my head around both methods i want to automate it all with a batch file and do away with 3rd party gui's.
 
Last edited:

abbodi86

Member
Code:
dism /Capture-Image /ImageFile:install.wim /CaptureDir:Z:\ /Name:"Windows 7" /ConfigFile:wimscript.ini /Compress:max /CheckIntegrity
imagex /flags "Ultimate" /check /info install.wim 1 "Windows 7 Ultimate" "Windows 7 Ultimate"
only imagex can set the wim image edition flag
 
Top