Sign in to follow this  
Followers 0
PcExpert

Run Script

13 posts in this topic

Hello,

Normally a script stops running when a user logs out. But I want the script to continue, even if the user logs out. But how can I do that?

Share this post


Link to post
Share on other sites



Hello,

Normally a script stops running when a user logs out. But I want the script to continue, even if the user logs out. But how can I do that?

I do not think you can. I am sure that someone has to be logged in for a script to run.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

But can't you even open or close a CDROM drive if there's nobody logged in?

Share this post


Link to post
Share on other sites

But can't you even open or close a CDROM drive if there's nobody logged in?

Try it and see. All you have to do is compile your script, schedule it to run in 5mins time then log out.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

But can't you even open or close a CDROM drive if there's nobody logged in?

If you execute your script as a GPO startup/shutdown script then yes. There is certain precautions of what a script can do or not. Else those spyware and virus folks would demolish our systems (and they would).

Share this post


Link to post
Share on other sites

How to excute my script like a GPO startup/shutdown program?

Share this post


Link to post
Share on other sites

If you execute your script as a GPO startup/shutdown script then yes. There is certain precautions of what a script can do or not. Else those spyware and virus folks would demolish our systems (and they would).

How to excute my script like a GPO startup/shutdown program?

I got the feeling from MHz post, if you don't know, and don't do your own homework on the situation, then you won't know kind of thing. He gave you the bone, now it's time to dig :think:.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

If you type gpedit.msc into the run box then choose Scripts(Startup/Shutdown) under the Computer Configuration -> Window Settings branch then you can setup a Startup/Shutdown script. This will run a script under the system account. This is accesed under XP Pro.

Share this post


Link to post
Share on other sites

The script would either need to run as a service, or you could try the task scheduler. I've never tried to use the task scheduler to do what you are attempting, so you would need to check it to see. If you want information on running a script as a service, you will need to do a search for it. Microsoft has a tool, but I don't remember the name of it.

Share this post


Link to post
Share on other sites

I got the feeling from MHz post, if you don't know, and don't do your own homework on the situation, then you won't know kind of thing. He gave you the bone, now it's time to dig :).

If you type gpedit.msc into the run box then choose Scripts(Startup/Shutdown) under the Computer Configuration -> Window Settings branch then you can setup a Startup/Shutdown script. This will run a script under the system account. This is accesed under XP Pro.

Or I could be wrong (looks like he has a bag of bones :()... :think:

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Or I could be wrong (looks like he has a bag of bones :()... :think:

Well, to script from a users account into the system/default users account then yes. Just bones perhaps, but system protection is a priorty from preventing a script from doing too much. Especially when a system is not logged on.

Share this post


Link to post
Share on other sites

Thanks

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  
Followers 0