feat(deploy-win): set cmd.exe shell in autounattend (specialize pass)
Add a Microsoft-Windows-Deployment RunSynchronousCommand in the specialize pass that sets Winlogon\Shell=cmd.exe before the first logon. A freshly deployed template then never starts explorer — not even the transient desktop during OOBE/install — closing the last window where the shell could crash-loop during servicing. post-install.ps1 and prepare-win still re-affirm it for redundancy / existing templates.
This commit is contained in:
@@ -127,6 +127,23 @@
|
||||
<RegisteredOwner>CI</RegisteredOwner>
|
||||
<RegisteredOrganization>CI Lab</RegisteredOrganization>
|
||||
</component>
|
||||
|
||||
<!-- Set the interactive shell to cmd.exe before the first logon, so a
|
||||
headless CI build VM never starts explorer (which crash-loops during
|
||||
heavy servicing). post-install.ps1 / prepare-win re-affirm this. -->
|
||||
<component name="Microsoft-Windows-Deployment"
|
||||
processorArchitecture="amd64"
|
||||
publicKeyToken="31bf3856ad364e35"
|
||||
language="neutral"
|
||||
versionScope="nonSxS">
|
||||
<RunSynchronous>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Path>reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d cmd.exe /f</Path>
|
||||
<Description>Set interactive shell to cmd.exe</Description>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
</settings>
|
||||
|
||||
<settings pass="oobeSystem">
|
||||
|
||||
Reference in New Issue
Block a user