Locking a computer

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Locking a computer

Post by bidgeeman » Tue Jul 14, 2009 2:28 am

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

!Jerry!
Posts: 16
Joined: Tue Apr 07, 2009 3:49 pm

Re: Locking a computer

Post by !Jerry! » Tue Jul 14, 2009 9:10 am

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

Post Reply