Hi everybody,
I need a solution. In windows xp, we can simply lock our workstation by pressing windows logo key + L. Now I want to make an application which will automatically do that after a pre-determined time and the user has no need to press those keys. How to do that?
Pls, help me as soon possible. Thanks in advance...
Lock Workstation
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Try this:
You could also lock the workstation using VBScript and the command do instead of the function shell.
See also: Hey, Scripting Guy! Can I Lock a Workstation Using a Script?
Code: Select all
set the hideConsoleWindows to true
put shell ("RunDLL32.EXE user32.dll,LockWorkStation")
Code: Select all
On Error Resume Next
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "%windir%\System32\rundll32.exe user32.dll,LockWorkStation"