Create a Custom Windows ISO with Preinstalled Software
Hello everyone,
To run sysprep in windows os 10 or 11 , check for windows update and if you get message You’re up to date then navigate to C:\windows\system32\sysprep and then right click sysprep application file to run as administraror
Then check Generalize in OOBE and select shutdown in System Prepartation Tool 3.14 box .
If errors like app removal error, fatal error or unable to validate current windows installation occurs , then I resolved these errors by following steps:-
(A) See the error regarding with app removal in c:\windows\system32\sysprep\panther\setuperr text file and type commands similar to following examples:-
{Error to remove application followed by application name is to be noted.}
Commands are shown as an example if errors are occured while removing these applications.
Get-AppxPackage -allusers AdobeNotificationClient_3.0.1.1_x86__enpm4xejd91yc | Remove-AppxPackage
Get-AppxPackage -allusers AdobeNotificationClient | Remove-AppxPackage -AllUsers
Get-AppxPackage -allusers “Microsoft.BIngSunshine” | Remove-AppxPackage -AllUsers
Get-AppxPackage -allusers “312588en48.BasicPhotoviewer_3.7.2.0._x64_2c5bccghv4cc2 | Remove-AppxPackage
Get-AppxPackage -allusers “312588en48.BasicPhotoviewer | Remove-AppxPackage -AllUsers
Your computer may show different error messages regarding with applications installed in your pc.
(B) Following changes in registry make sysprep to run without errors.
Run Regedit as administrator , then navigate to the paths :-
1. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform
Right click SkipRearm , click modify, and change value data to 1.
2. HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus
Right click GeneralizationState >modify, change value data 7. In the same pane, if CleanupState key is not present then
right click New> DWORD(32-bit) Value >CleanupState right click modify change value data to 2.
(C) Run cmd as administrator
c:\windows\system32 > msdtc -uninstall
c:\windows\system32 >msdtc -install
(D). Then run powershell as administrator and type:-
PS C:\windows\system32>Get-AppxPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}
Please note colours of the words shown may appear different but highlighted with colour in powershell.(In my pc in powershell , it appeared yellow and symbol $ inside bracket of green colour.)
After shutdown, boot from bootable usb of windows 11.
Select > repair >troubleshoot>command prompt
x:\sources>c:
c:>dir
if windows is located on C: then run following command to capture install.wim of current windows.
c:\>dism /capture-image /imagefile:X:\install.wim /capturedir:C:\ /name:win_11
(change letters according to your windows installation directory , and destination location to save install.wim )
Place this captured install.wim in bootable usb prepared by media creation tool which has install.esd . You get up to date custom bootable usb of windows 11. ( When booted install.wim runs first ,not install.esd)
Now when you boot normally from hard disk/ssd wherefrom we have run sysprep, you have to set some windows installtion settings as if new installation goes on.
Have an error free up to date install.wim (captured) of current windows 11 operating system. To add, when installed on any other partition, the data inside C: drive/partition is also copied to the destination drive/partition as it is capured by dism /capture-image command.
Thanks for reading.
While doing Sysprep and capturing install.wim in Windows 11 v 24H2 build 26000.1742, if error is displayed then look into setupact.log or setuperr text file as mentioned by pop up message.
1. In my case, after runnig Windows Update to keep windows up to date, I used Reset This PC option removing everything. Then run sysprep.exe as an administrator.(Turn internet off while running sysprep.) An error occured and was displayed in setupact.log regarding with spotify removal. I run following commands from windows powershell(as administrator) Turn internet on while running following commands
Get-AppxPackage -allusers SpotifyAB.SpotifyMusic_1.245.454.0_x64__zpdnekdrzrea0 | Remove-AppxPackage
Get-AppxPackage -allusers “SpotifyAB.SpotifyMusic” | Remove-AppxPackage -AllUsers
Please see the image attached herewith. I regret for poor picture quality.
2. While doing Sysprep and capturing install.wim in Windows 11 v 24H2 build 26000.1742 , in case of bitlocker on , if sysprep shows error”unable to turn bitlocker off in drive ” in c:\windows\system32\sysprep\panther\setuperr text file or setupact.log , then we have to run command from windows powershell as administrator:-
PS C:\windows\system32\Disable-Bitlocker -MountPoint ‘C:’
Repeat this command until Encryption percentage becomes 0 and get message as “Bitlocker Drive Encryption is not enabled on this drive.”
Please see images attached herewith.
(B) I have run following commands to capture the image of running windows 11 v24H2 build 26100.1742 from bootable usb.
x:\sources>dism /capture-image /imagefile:X:\install.wim /capturedir:Y:\ /name:”Recovery” /description:”My Custom Recovery Image” /compress:maximum
(X: is location of install.wim to be captured, and Y: is operating system windows directory.)
x:\sources>dism /capture-image /imagefile:X:\install.wim /capturedir:Y:\ /name:”Win11v24H2″ /description:”OS BUILD 261001742″ /compress:maximum
(X: is location of install.wim to be captured, and Y: is operating system windows directory.)
name in quotation mark appears in Operating System and description appears below Windows Setup box according to your typed words.
Please see images attached herewith.
(C) Place this install.wim file in sources folder of NTFS PARTITION of bootable usb.
Mount iso of Windows 11 v24H2 downloaded from uupdump.net and copy all files to NTFS partition and excluding soures folder copy all files to FAT32 folder. Manually create sources folder and cut boot.wim from sources folder of NTFS partition to paste into sources folder of FAT32 partition. Also extract bypass.zip to NTFS partition and then right click auto.cmd to run as administratior.
{This patched bootable usb is ready to bypass hardware requirements to install windows 11 v24H2.}
Then replace install.wim in sources folder of NTFS partition by captured install.wim which is much bigger than original install.wim
If bootable usb is created by media creation tool from Microsoft official website then no need to replace install.esd in sources folder.
install.wim takes first place to work .
You need to convert FAT32 partition to NTFS partition by third party tools like minitool wizard, easeus partition master, etc.
Then installation starts as normal when bootable usb prepared in this way is selected to boot first from BIOS.
Thanks for sharing your valuable time.