After Win10 21H2 sysprep: please help

fxart

New Member
Hi Guys, please: after 10P 21H x64 sysprep, touch keyboard do not launch anymore. I have to re-register all the store apps with this command:
Get-AppxPackage -allusers | foreach {Add-AppxPackage -register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode}
It's not a bug of NTlite. I'am searching help for add the command of above during OS setup via NTlite post process $OEM$ folder\SetupComplete.cmd or similar.
please, it's very important.
I have removed anything!
you can simulate the same Windows bug creating a new user before sysprep than closing the audit mode.
After OS setup, touch keyboard panel is not showned anymore [not osk.exe].
Please, help me to integrate the command of above during the SetupComplete process and automatically.
Thanks in advanced.
 
This is a common issue:
Windows Update will update the installed Store apps in the background, or you added/removed Appx packages.

Your options:
1. Disable networking (unplug the cable) before Windows reboots into sysprep.
2. Disable Windows Update service in the install image. If you want WU working in the captured image, reset WU's start state.
  • sc config wuauserv start= enabled
3. Remove all user provisioning before capturing the image.
  • Get-AppxProvisionedPackage –online | Remove-AppxProvisionedPackage -online
  • Get-AppxPackage –AllUsers | Remove-AppxPackage
 
Hi, sorry for the late... I'am OOO for my job!
None, 22H2 captured without removing anything and disabling lan first, does not work correctly
after logon, the touch keyboard does not appear. before sysprep works fine
Works only if i launch this command via powershell: Get-AppxPackage -allusers | foreach {Add-AppxPackage -register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode}

Our 10 22h2 image contain only one user called OEM with some customization related to the start menu and icons. nothing is disabled.

please: can anyone help me to adjust these two scripts?

SetupComplete.cmd?
@echo off
for %%w IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%w:\sources\install.esd SET CDROM=%%w:
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx /f
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REM REG ADD %KEY% /v Flags /t REG_DWORD /d "20" /f
REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v Setup /t REG_SZ /d "cmd.exe /C start /min C:\Windows\Setup\Scripts\Fix.cmd" /f
del /q /f "%0"
Exit


fix.cmd
@echo off
start /wait "" %WINDIR%\System32\FX.exe
start /wait "" %WINDIR%\Setup\Files\Cleanup.cmd"
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" /v Setup /f
rd /q /s "%WINDIR%\Setup\Files"
del /q /f "%0"
EXIT

"FX.exe" is the "Get-AppxPackage -allusers | foreach {Add-AppxPackage -register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode}" command compiled as "exe" with a PS to Exe app and works 100%.

The only thing that does not work correctly is that after any restart, the "fix.cmd" is executed again.
Every reboot.
We need only the first time for at least the user OEM who is one admin.
It's not necessary that the PS1 script is launched as executable.

How stop this?

please, help me.
Thanks in advance
 
RunOnce/RunOnceEx instead of Run for the actual command. RunOnce registry key will delete after execution, no need to clean registry in fix.cmd.
 
Back
Top