Jump to content
Sign in to follow this  
NelsonAz

How to pause script execution until a user has logged in

Recommended Posts

NelsonAz

Hello,

I'm currently working on an automation script which executes a set of installers and then performs a reboot.

After rebooting the system, the script starts up (using a runOnce registry key).

Question: Is there a way to pause the script until a user has logged into the system (rather than waiting an arbitrary amount of time)?

The reason I ask is that certain AutoIt functions which I'm using after the reboot are failing, as no user is logged in.

Thank you,

Nelson

Share this post


Link to post
Share on other sites
goss34

Could you place the script here:

%allusersprofile%/Start Menu\Programs\Startup

This should then run when any user logs on.

Share this post


Link to post
Share on other sites
ViciousXUSMC

HKCU Runonce should not run until the user has logged in.

I guess HKLM runs without a user?

I normally put all my scripts in the All User Startup Folder and I know they do not run until they log in. If i need run once I just have my script check for a reg key.

Share this post


Link to post
Share on other sites
NelsonAz

Thank you both for your assistance.

Nelson

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×