I've tried the steps below to avoid SYSPREP errors without sucess... Error: 2023-07-30 17:15:24, Error SYSPRP MSS: Error 0x424 occurred while obtaining service handle for WSearch in call _EnableOrDisableService.[gle=0x00000424] 2023-07-30 17:15:25, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'MSSrch_SysPrep_Cleanup' from C:\Windows\System32\mssrch.dll; dwRet = 0x424 2023-07-30 17:15:25, Error SYSPRP SysprepSession::ExecuteAction: Failed during sysprepModule operation; dwRet = 0x424[gle=0x00000006] 2023-07-30 17:15:25, Error SYSPRP SysprepSession::ExecuteInternal: Error in executing action for WindowsSearchEngine; dwRet = 0x424[gle=0x00000006] 2023-07-30 17:15:25, Error SYSPRP SysprepSession::Execute: Error in executing actions from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml; dwRet = 0x424 2023-07-30 17:15:25, Error SYSPRP RunPlatformActions:Failed while executing Sysprep session actions; dwRet = 0x424 2023-07-30 17:15:25, Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x424 2023-07-30 17:15:25, Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep cleanup providers; hr = 0x80070424 Steps proceeded (And not solved anything): Get-AppxPackage -AllUsers | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation. Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”} cscript c:\windows\system32\slmgr.vbs -rearm HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\ -> "SkipRearm" must have value "1" HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus -> "GeneralizationState" key must have value "7", and "CleanupState" key must have value "2" HKEY_LOCAL_MACHINE\SYSTEM\Setup\ -> delete "Upgrade" key Disable and reenable MSDTC services... CMD with admim privileges: msdtc -uninstall, restart machine, msdtc -install Run sysprep again. Try to change Generalize XML File - Workaround solution: 1) Take ownership of file C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml. Default owner is System Installer, change to Administrators 2) Change permissions to grant Users+Administrators Modify permission on the file 3) Edit the file and search for line referencing the DLL file SPMPM.DLL and remove that line (around line 22) remove the entire line including <imaging></imaging> i.e. remove this line <imaging exclude=""><assemblyIdentity name="Microsoft-Windows-Sysprep-MountPointManager" version="10.0.19041.1" publicKeyToken="31bf3856ad364e35" processorArchitecture="amd64" versionScope="NonSxS"></assemblyIdentity> <sysprepOrder order="0x0800"></sysprepOrder> <sysprepModule methodName="Sysprep_Generalize_MountPointManager" moduleName="$(runtime.system32)\spmpm.dll"></sysprepModule></imaging> 4) Save the file and run Sysprep ALL THIS STEPS FAILED!!! - I Don't know what could be done to fix SYSPREP. All suggestions will be highly appreciated
And doing alot of other stuff not necessary. Just have in mind some programs do break sysprep, I've had issues with some AV's but that was long time ago. Install the most necessary programs but dont touch any MS Store apps!
install vmware workstation pro 16 ( 17 not works ! ) install you os ( enter name like test for user ) , in VM make up to date os update and windows store app if applicable , install any software after full up to date and software you need shutdown vm remove network card boot vm ( with network card removed ) launch syspep in audit mode after the reboot by sysprep you are in administrator aka audit mode delete "test" user created for installing windows and choose oobe mode generalize and shutdown after create snapshot ( with vm shutdown ) go to cd-rom drive for this vm choose any winpe like sergei strelec on power option use power to firmware make cd-rom / dvd as first boot on sergei strelec use gimagex dont change os detection ! save install.wim to virtual disque like d:/install.wim after succes shutdown map drive on root of you virtual drive copy you install.wim to you desktop replace install.wim from iso with yours
Aside that if sysprep fails because the OS is modified it will fail on VMware as well. Why such complication? Just use hyper-V. Deploy the image in a vhdx Boot in audit mode, install whatever you like do sysprep/generalize/shutdown mount the vhdx and capture the wim using dism/wimlib/imagex/gimagex That's all If you really want to use VMware, deploy the image to a vhdx (is not possible to do that in vmdk) Use the mounted vhdx as physical disk in vmware, then do the same of above. Even better/easier/more convenient, don't capture/use a wim at all. Just boot the vhdx as is and forget about ISOs and other procedures from the last millennium.
That's not needed, just remove it after the first boot (showing the hidden devices in device manager) The generalize part is really important only for HDD controllers, but nowadays 99% of the installations are on AHCI or NVME, so most installations can be moved w/o any problem even w/o a proper generalization process.
Hyper-V is a practical way, but not a requirement. And if sysprep fails for whatever reason, it will fail no matter if you are in HV, VMware, Vbox, a physical partition or a native vhd
Do not deleting WSearch services. To fix this error, perhaps must put back the service. Code: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\WSearch] "DelayedAutoStart"=dword:00000001 "DependOnService"=hex(7):52,00,50,00,43,00,53,00,53,00,00,00,42,00,72,00,6f,00,\ 6b,00,65,00,72,00,49,00,6e,00,66,00,72,00,61,00,73,00,74,00,72,00,75,00,63,\ 00,74,00,75,00,72,00,65,00,00,00,00,00 "Description"="@%systemroot%\\system32\\SearchIndexer.exe,-104" "DisplayName"="@%systemroot%\\system32\\SearchIndexer.exe,-103" "ErrorControl"=dword:00000001 "FailureActions"=hex:80,51,01,00,00,00,00,00,00,00,00,00,06,00,00,00,14,00,00,\ 00,01,00,00,00,30,75,00,00,01,00,00,00,30,75,00,00,01,00,00,00,30,75,00,00,\ 01,00,00,00,30,75,00,00,01,00,00,00,30,75,00,00,00,00,00,00,00,00,00,00 "FailureActionsOnNonCrashFailures"=dword:00000001 "ImagePath"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\ 74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,53,\ 00,65,00,61,00,72,00,63,00,68,00,49,00,6e,00,64,00,65,00,78,00,65,00,72,00,\ 2e,00,65,00,78,00,65,00,20,00,2f,00,45,00,6d,00,62,00,65,00,64,00,64,00,69,\ 00,6e,00,67,00,00,00 "ObjectName"="LocalSystem" "RequiredPrivileges"=hex(7):53,00,65,00,43,00,68,00,61,00,6e,00,67,00,65,00,4e,\ 00,6f,00,74,00,69,00,66,00,79,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,\ 67,00,65,00,00,00,53,00,65,00,4d,00,61,00,6e,00,61,00,67,00,65,00,56,00,6f,\ 00,6c,00,75,00,6d,00,65,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,67,00,\ 65,00,00,00,53,00,65,00,49,00,6d,00,70,00,65,00,72,00,73,00,6f,00,6e,00,61,\ 00,74,00,65,00,50,00,72,00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,\ 53,00,65,00,41,00,73,00,73,00,69,00,67,00,6e,00,50,00,72,00,69,00,6d,00,61,\ 00,72,00,79,00,54,00,6f,00,6b,00,65,00,6e,00,50,00,72,00,69,00,76,00,69,00,\ 6c,00,65,00,67,00,65,00,00,00,53,00,65,00,49,00,6e,00,63,00,72,00,65,00,61,\ 00,73,00,65,00,51,00,75,00,6f,00,74,00,61,00,50,00,72,00,69,00,76,00,69,00,\ 6c,00,65,00,67,00,65,00,00,00,53,00,65,00,54,00,63,00,62,00,50,00,72,00,69,\ 00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,00,00 "ServiceSidType"=dword:00000001 "Start"=dword:00000004 "Type"=dword:00000010 [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\WSearch\Security] "Security"=hex:01,00,04,80,a8,00,00,00,b4,00,00,00,00,00,00,00,14,00,00,00,02,\ 00,94,00,05,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,05,12,00,\ 00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,20,02,00,\ 00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,04,00,00,00,00,00,14,00,\ 8d,01,02,00,01,01,00,00,00,00,00,05,06,00,00,00,00,00,38,00,8d,00,02,00,01,\ 0a,00,00,00,00,00,0f,03,00,00,00,00,04,00,00,d8,ad,32,2b,10,24,2d,48,41,35,\ 34,1d,44,24,f8,25,6d,72,6b,c7,f6,48,99,b8,07,31,f2,66,b3,f7,11,05,01,01,00,\ 00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00 [HKEY_LOCAL_MACHINE\mtSYS\ControlSet001\Services\WSearchIdxPi\Performance] "Close"="PerfmonIDXClose" "Collect"="PerfmonIDXCollect" "Library"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\ 74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,74,\ 00,71,00,75,00,65,00,72,00,79,00,2e,00,64,00,6c,00,6c,00,00,00 "Open"="PerfmonIDXOpen" "InstallType"=dword:00000001 "PerfIniFile"="idxcntrs.ini" "First Counter"=dword:00001e98 "Last Counter"=dword:00001f16 "First Help"=dword:00001e99 "Last Help"=dword:00001f17 "Object List"="7832"
Use dism or power shell to install the app. ie: Code: Dism /Online /Add-ProvisionedAppxPackage /PackagePath:f4ec19736f874fa89a009d4f6ebe0453.appxbundle ^ /DependencyPackagePath:Microsoft.VCLibs.140.00_14.0.32530.0_x64__8wekyb3d8bbwe.appx ^ /DependencyPackagePath:Microsoft.VCLibs.140.00_14.0.32530.0_x86__8wekyb3d8bbwe.appx ^ /LicensePath:f4ec19736f874fa89a009d4f6ebe0453_License1.xml /region=all