windows
windows copied to clipboard
Is "FirstLogonCommands" ran when it boots to the Desktop or part of the installation?
I saw the discussion from another ticket: https://github.com/dockur/windows/issues/187#issuecomment-1961974996
and am trying to understand how <FirstLogonCommands>
works. Is this part of the first-time installation process? (before the VM reboots) or do these commands happen when the VM reboots and we are automatically logged into the desktop for the first time?
It depends a bit on the Windows version I guess. On Win11 and lower they are invisibly executed before you see the login screen and the desktop. But on Windows Server the execution is not hidden and you can see them visibly being executed after you already see the desktop.
But in both cases they are executed as the very last step (so after the reboot and around the time of logging in).
Its also possible to execute commands during the installation, so before the reboot. See for example RunSynchronous
in the Win11 XML.
Closing because of no response.