Jump to content

Windows Tasks


Recommended Posts

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?

Link to comment
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.

Link to comment
Share on other sites

#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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...