Jump to content

Recommended Posts

I would like to execute some scripts early in the morning while keeping my workstation locked so nobody can mess with it.

How can I have the script unlock my workstation, run the task and then lock it again?

Or, can the script run while the workstation is locked?

Thanks for a GREAT PRODUCT.

Ken Juenke

Link to post
Share on other sites

sorry, didn't notice the subject of that one, thus, I quote the helpfile entry for send:

Windows does not allow the simulation of the "CTRL-ALT-DEL" combination!

"I'm not even supposed to be here today!" -Dante (Hicks)

Link to post
Share on other sites

> can the script run while the workstation is locked?

> yeah, they can run while locked. mouseclicks and sends won't work, > but controlclicks and controlsends will.

This info helps me very much. BTW, the Help file doesn't have a complete list of functions that work while the workstation is locked.

Link to post
Share on other sites
Guest Guest

This might be a little cleaner and easier:

Either create a batch file to run, or run from the command prompt this:

%windir%\System32\rundll32.exe user32.dll,LockWorkStation
Link to post
Share on other sites
Guest Guest

This might be a little cleaner and easier:

Either create a batch file to run, or run from the command prompt this:

%windir%\System32\rundll32.exe user32.dll,LockWorkStation

EDIT:

I didn't completely read the original post... I thought you meant you wanted to lock the workstation after running the script...

Link to post
Share on other sites
  • 3 weeks later...
Guest q3wert

maybe

UnlockWindowStation

LocalUnlock

GlobalUnlock

work as methods (by chance)?

i'm too tired to set something up to test right now.

good night...

(btw., i just peeked in user32 and found these strings...)

Link to post
Share on other sites
  • 3 weeks later...

CTRL+ALT+DEL is dangerous when used with automation.

Reasons:

- On Windows 2k people will be able to send the command and press on "Change Password" and change the password to something random and log you off.

- On Windows 9x people will be able to add the current the script to a startup location that sends the command and your PC will keep rebooting infinite times (Like the Sasser worm).

Edited by SlimShady
Link to post
Share on other sites

The Ctrl Alt Del combination is not as dangerous as you make it seem, other methods can be employed just as easilly, if not more easilly, to accomplish the same tasks that the key combination provides link to. If I recall, in Win2K choosing to change the password requires the current password first, also, I can very simply write a batch file and either create a shortcut to it in the startup folder, or in the registry, that will restart the computer immediately upon logon (I know this because of a screensaver I wrote which logs my account off, not locks the computer, upon a certain ammount of idle time; the commands to restart and log off are accomplished through very similar means.)

Link to post
Share on other sites

If you want to lock the keyboard you can just run

Run( @SystemDir & '\rundll32.exe user32.dll,LockWorkStation' )

As for unlocking, that is a hardware interrupt, int 9

:ph34r:

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to post
Share on other sites

Run("taskmgr.exe")
:ph34r:
not nearly the same as ctrl-alt-del... doesn't unlock the locked workstation window, doesn't allow someone to enter username and password at the login screen...

"I'm not even supposed to be here today!" -Dante (Hicks)

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...