feat(deploy-win): disable Server Manager auto-launch in autounattend
Add specialize-pass RunSynchronousCommands to disable the ServerManager scheduled task (the actual auto-launcher on WS2025) plus the HKLM/policy DoNotOpen* keys, so Server Manager never pops up — not even at the first logon, before post-install runs. Redundant with post-install.
This commit is contained in:
@@ -142,6 +142,24 @@
|
||||
<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>
|
||||
<!-- Stop Server Manager auto-launching even at the first logon: the
|
||||
ServerManager scheduled task is the actual launcher on WS2025;
|
||||
the registry keys are belt-and-suspenders. -->
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Path>schtasks /Change /TN "\Microsoft\Windows\Server Manager\ServerManager" /Disable</Path>
|
||||
<Description>Disable Server Manager auto-launch task</Description>
|
||||
</RunSynchronousCommand>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>3</Order>
|
||||
<Path>reg add "HKLM\SOFTWARE\Microsoft\ServerManager" /v DoNotOpenServerManagerAtLogon /t REG_DWORD /d 1 /f</Path>
|
||||
<Description>Do not open Server Manager at logon (HKLM)</Description>
|
||||
</RunSynchronousCommand>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>4</Order>
|
||||
<Path>reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\ServerManager" /v DoNotOpenAtLogon /t REG_DWORD /d 1 /f</Path>
|
||||
<Description>Do not open Server Manager at logon (policy)</Description>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
</settings>
|
||||
|
||||
Reference in New Issue
Block a user