Sign in to follow this  
Followers 0
candyman

Windows Tasks

3 posts in this topic

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



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

#3 ·  Posted (edited)

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