Page 1 of 1

Locking a computer

Posted: Tue Jul 14, 2009 2:28 am
by bidgeeman
Hello.
I found this code to lock a windows pc in another thread

Code: Select all

set the hideConsoleWindows to true 
put shell ("RunDLL32.EXE user32.dll,LockWorkStation")
I am wondering how you UNLOCK the machine after you lock it?
Would it be?

Code: Select all

set the hideConsoleWindows to true 
put shell ("RunDLL32.EXE user32.dll,UnLockWorkStation")

Also, is there a way to do similar task on a mac?

Cheers
Bidge

Re: Locking a computer

Posted: Tue Jul 14, 2009 9:10 am
by !Jerry!
bidgeeman wrote:Hello.
I found this code to lock a windows pc in another thread

Code: Select all

set the hideConsoleWindows to true 
put shell ("RunDLL32.EXE user32.dll,LockWorkStation")
I am wondering how you UNLOCK the machine after you lock it?
Would it be?

Code: Select all

set the hideConsoleWindows to true 
put shell ("RunDLL32.EXE user32.dll,UnLockWorkStation")

Also, is there a way to do similar task on a mac?

Cheers
Bidge
Hi bidgeeman!

There is - in the same article (about the locking) - http://www.microsoft.com/technet/script ... y1115.mspx
also this citation:
can you write a script that unlocks a workstation? As far as we know, you can’t; in fact, as far as we know the only way to unlock a workstation is to have someone go to the computer, press Ctrl-Alt-Delete and log on.
So, it is an unpleasant but clear solution, I think ...

Jerry