@gailium119, I got this error this time: Code: Error: 0x80029c4a The request is not supported. Also, my previous tries was copying whole dism folder. This time, I copied DismProv.dll file only. But this error is same as when I do not copy the file. Only the error code is different.
Staged Windows 10.0.19041.1 Professional based on stageSxS-principalis: Sysprep errors: Code: Error Sysprep_Generalize_MountPointManager: RegDeleteKey failed with error=2 Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'Sysprep_Generalize_MountPointManager' from C:\Windows\System32\spmpm.dll; dwRet = 0x2 Error SYSPRP SysprepSession::ExecuteAction: Failed during sysprepModule operation; dwRet = 0x2 Error SYSPRP SysprepSession::ExecuteInternal: Error in executing action for Microsoft-Windows-Sysprep-MountPointManager; dwRet = 0x2 Error SYSPRP SysprepSession::Execute: Error in executing actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x2 Error SYSPRP RunPlatformActions:Failed while executing Sysprep session actions; dwRet = 0x2 Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x2 Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0x80070002 Any ideas ?
Modded tweak: Code: @echo off set mount=D:\ rmdir /s /q D:\sources rmdir /s /q D:\windows\csc rmdir /s /q D:\perflogs\admin rmdir /s /q D:\windows\prefetch md D:\Windows\Setup\State echo:[State]>D:\Windows\Setup\State\State.ini echo:ImageState=IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE>>D:\Windows\Setup\State\State.ini Reg.exe load hklm\sys D:\windows\system32\config\system Reg.exe add "HKLM\sys\Setup\SetupCl\PendingRequest" /v "OperationFlags" /t REG_DWORD /d 30987 /f Reg.exe add "HKLM\sys\ControlSet001\Control\Session Manager" /v "setupexecute" /t REG_MULTI_SZ /d "setupcl.exe" /f Reg.exe unload hklm\sys Reg.exe load hklm\soft D:\windows\system32\config\software Reg.exe add "HKLM\soft\Microsoft\Windows NT\CurrentVersion" /v "PathName" /t REG_SZ /d "X:\Windows" /f Reg.exe add "HKLM\soft\Microsoft\Windows NT\CurrentVersion" /v "CompositionEditionID" /t REG_SZ /d "Professional" /f Reg.exe add "HKLM\soft\Microsoft\Windows NT\CurrentVersion" /v "ProductName" /t REG_SZ /d "Windows 10 Professional" /f Reg.exe add "HKLM\soft\Microsoft\Windows\CurrentVersion\SideBySide\Configuration" /v "DisableResetbase" /t REG_DWORD /d 0 /f Reg.exe add "HKLM\soft\Microsoft\Windows\CurrentVersion\SideBySide\Configuration" /v "MobileStoreVersion" /t REG_DWORD /d 2 /f Reg.exe add "HKLM\soft\Microsoft\Windows\CurrentVersion\SideBySide\Configuration" /v "DontRunPoqexecInSmss" /t REG_DWORD /d 1 /f Reg.exe add "HKLM\soft\Microsoft\Windows\CurrentVersion\SideBySide\Configuration" /v "CreateNewWindowsVersion" /t REG_DWORD /d 1 /f Reg.exe add "HKLM\soft\Microsoft\Windows\CurrentVersion\Setup\State" /v "ImageState" /t REG_SZ /d "IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE" /f Reg.exe unload hklm\soft pause and Code: copy C:\mount\Windows\assembly\NativeImages_v4.0.30319_32 to D:\Windows\assembly copy C:\mount\Windows\assembly\NativeImages_v4.0.30319_64 to D:\Windows\assembly Reg.exe load HKLM\SOFT C:\mount\Windows\System32\config\SOFTWARE Reg.exe export HKLM\SOFT\Microsoft\.NETFramework\v2.0.50727 C:\NETFW_2.0.50727x64.reg Reg.exe export HKLM\SOFT\WOW6432Node\Microsoft\.NETFramework\v2.0.50727 C:\NETFW_2.0.50727x32.reg Reg.exe unload HKLM\SOFT Reg.exe load HKLM\SOFT D:\Windows\System32\config\SOFTWARE Regedit C:\NETFW_2.0.50727x64.reg Regedit C:\NETFW_2.0.50727x32.reg Reg.exe unload HKLM\SOFT
Tested Winre unstaged construction Spoiler: Packages with problem Code: WinPE-SecureStartup-Package~31bf3856ad364e35 WinPE-StorageWMI-Package~31bf3856ad364e35 The problemed packages won't be installed the first time they are installed in xml method. Solution: Install the xml TWICE.
WinRE? Your script downloads 38 Professional_xx-xx.esd and each of them has winre.wim (index 2) in its own language...
But it is nearly impossible to extract the langpacks from uup winre.wim Plus, I'm finding a way to store images in a least storage-taking method
Research it yourself. I don't use sysprep. EDIT: Tested Windows 11 22000.1 Core zh-CN Sysprep works fine.
Sysprep errors Fixed: Code: copy C:\mount\Windows\assembly\NativeImages_v4.0.30319_32 to D:\Windows\assembly copy C:\mount\Windows\assembly\NativeImages_v4.0.30319_64 to D:\Windows\assembly Reg.exe load HKLM\SOFT C:\mount\Windows\System32\config\SOFTWARE Reg.exe export HKLM\SOFT\Microsoft\.NETFramework\v2.0.50727 C:\NETFW_2.0.50727x64.reg Reg.exe export HKLM\SOFT\WOW6432Node\Microsoft\.NETFramework\v2.0.50727 C:\NETFW_2.0.50727x32.reg Reg.exe unload HKLM\SOFT Adding these cmds back to tweak.cmd fixed Sysprep errors:: Reg.exe load HKLM\SOFT D:\Windows\System32\config\SOFTWARE Reg.exe delete "HKLM\SOFT\Microsoft\.NETFramework\NGenQueue\WIN32\Default" /f Reg.exe delete "HKLM\SOFT\Microsoft\.NETFramework\NGenQueue\WIN64\Default" /f Reg.exe add "HKLM\SOFT\Microsoft\.NETFramework\NGenQueue\WIN32\Default" Reg.exe add "HKLM\SOFT\Microsoft\.NETFramework\NGenQueue\WIN64\Default" Reg.exe unload HKLM\SOFT Reg.exe load HKLM\SOFT D:\Windows\System32\config\SOFTWARE Regedit C:\NETFW_2.0.50727x64.reg Regedit C:\NETFW_2.0.50727x32.reg Reg.exe unload HKLM\SOFT All credit go to gailium119 & his tweak.cmd.
Unfortunately, that breaks ngen as I feedbacked. Maybe bad luck for me. 22000. So I decided to use ngen command instead of registry tweak. Problem gone. No need to copy\delete this, export\import that. So many editions, so many builds. Microsoft uses ngen command. You can check ngen.log in official images.
What do you mean 'Break'? The image created already has native images and its registry, so ngen is not needed.