
CTRL ALT CANC Keystrokes...
Why not use the command:
WshShell.Run "rundll32.exe usere32.dll,LockWorkstation"
G. Born
Check out the WSH Bazaar at:
http://ourworld.compuserve.com/homepages/guenter_Born/index0.htm
Alfredo Morresi schrieb in Nachricht
Quote:
>Hi all...
>Under NT4 i need to automatically call the CTRL ALT CANC box and select the
option "Lock Workstation"
Quote:
>I think that WshShell.SendKeys method is good for this, but it doesn't
work...
>The problem is that the first box doesn't appears, so i cannot select the
Lock workstation option.
Quote:
>Is my wrong?
>How can i do this?
>set objWshShell = CreateObject("Wscript.Shell")
>objWshShell.SendKeys "%^{DELETE}"
>WScript.Sleep 500
>objWshShell.SendKeys "{ENTER}"
>set objWshShell = nothing
>I also tried:
>objWshShell.SendKeys "%(^{DELETE})"
>objWshShell.SendKeys "%(^({DELETE}))"
>objWshShell.SendKeys "^%{DELETE}"
>substituted {DELETE} with {DEL}
>...
>...
>.Enjoy.
>Legolas