Jump to content
Sign in to follow this  
candyman

Windows Tasks

Recommended Posts

candyman

Hello,

I am looking for a simple way to create a script to be converted to exe which works like this

Compared to batch:

wait.exe 120 //After the start 120 Seconds nothing happens

Rundll32 user32.dll,LockWorkStation // Lock Users Screen so that he has to relogin (Ctrl+Alt+Del)

Does anyone have ideas?

Share this post


Link to post
Share on other sites
JRowe

Right click on desktop, select the screensaver tab, check the "Display Welcome Screen" box, and set "Wait" to be two minutes, then click ok.

Share this post


Link to post
Share on other sites
KaFu

#include <Timers.au3>
While 1
    sleep(10)
    if _Timer_GetIdleTime() > 120 * 1000 then Run("RunDll32.exe user32.dll,LockWorkStation")
WEnd

Edit: Oh, I see... you don't want to check for activity, just log-off after 120 seconds...

sleep(120*1000)
Run("RunDll32.exe user32.dll,LockWorkStation")
Edited by KaFu

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.