windows icon indicating copy to clipboard operation
windows copied to clipboard

Is "FirstLogonCommands" ran when it boots to the Desktop or part of the installation?

Open y0utubeperson1 opened this issue 11 months ago • 1 comments

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?

y0utubeperson1 avatar Mar 03 '24 06:03 y0utubeperson1

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.

kroese avatar Mar 03 '24 06:03 kroese

Closing because of no response.

kroese avatar Mar 10 '24 10:03 kroese