Sign in to follow this  
Followers 0
kjuenke

Sending Ctrl-Alt-Del

14 posts in this topic

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

Share this post


Link to post
Share on other sites



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


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

Share this post


Link to post
Share on other sites

What does the code look like for a Ctrl-Alt-Del ? I would like to do that .

Share this post


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)

Share this post


Link to post
Share on other sites

But in remote controls program you can "Send" CTRL ALT CANC to the remote computer... I wonder, how it is done?

Share this post


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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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...)

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

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

Share this post


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.)

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

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.

 

Share this post


Link to post
Share on other sites

Run("taskmgr.exe")
:ph34r:

Share this post


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)

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