Using SCCM, I created a task scheduled to run once at Windows startup, which has an automatic login with a specific account, and this automatic login will only work once, and at this startup the task that calls it is activated. PSADT ps1 in system context to install some applications. I created two popup alerts in vbs using the parameter “ExecuteProcessAsUser” to run in user context, so the popups are seen by the user, where a popup is executed before any command in psadt, saying something like “Install post osd started , please wait” and another popup that runs at the end of the psadt saying something like “post setup successful”
But when you log in with an account for the first time, the one where Windows is preparing the user profile appears, and only then goes to the desktop, and as the ps1 script is executed when Windows starts, then psadt is already running before going to the desktop, and the first popup is suppressed because the user is not logged in yet, so the popup doesn’t appear but the application installations continue, so I can only see the last popup, which is when the user is already authenticated.
So I wanted to know if it would be possible to make “ExecuteProcessAsUser” run only if user “X” is already authenticated in Windows, making it possible to see this popup.