UserOnce and FirstLogon Scripts run in Parallel #372
Replies: 1 comment 1 reply
-
|
Your observation is correct. When the first user ever logs on the the system, both FirstLogon and UserOnce scripts will execute, and they might run in parallel. The first user is typically a member of the Administrators group (e.g. Admin in the form's preset), and in this case FirstLogon scripts will run with elevated permissions. For subsequent users (e.g. User in the form's preset), only UserOnce scripts will execute. In general, running FirstLogon and UserOnce scripts in parallel should not be a problem as their intended purposes are distinct. A UserOnce script should also be able to run for a limited user and perform per-user configuration, while a FirstLogon script will almost always require elevated permissions and affect the entire system, similar to System scripts. A typical use case for a FirstLogon script is to install a software when its installer refuses to work during the Specialize phase of Windows Setup. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As of 2026-03-06, it appears that the UserOnce scripts run in parallel with the FirstLogon scripts. Is this correct? Is there an easy way to enforce sequential runs, such that FirstLogon completes before UserOnce gets a chance to run?
(As a workaround, I can write my own check/wait/loop mechanisms, or move everything into UserOnce and add if-checks for a first-user-logon condition, but I want to confirm the expected parallel behavior, and whether there is a standard way to configure for sequential running.)
Beta Was this translation helpful? Give feedback.
All reactions