CTRL ALT CANC Keystrokes... 
Author Message
 CTRL ALT CANC Keystrokes...

Hi all...

Under NT4 i need to automatically call the CTRL ALT CANC box and select the option "Lock Workstation"
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.

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



Fri, 31 May 2002 03:00:00 GMT  
 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



Fri, 31 May 2002 03:00:00 GMT  
 CTRL ALT CANC Keystrokes...
The entry is LockWindowStation but that doesn't seem to work anyway.

Dale Strickland-Clark


Quote:
> 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

> >Hi all...

> >Under NT4 i need to automatically call the CTRL ALT CANC box and select
the
> option "Lock Workstation"
> >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.

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



Fri, 31 May 2002 03:00:00 GMT  
 CTRL ALT CANC Keystrokes...
10Q Gnter 4 your suggestion, but the system reply to me:

Error in user32.dll
Missiong Entry: LockWorkstation

What's wrong?

.Enjoy.
Legolas

Quote:

> 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

> >Hi all...

> >Under NT4 i need to automatically call the CTRL ALT CANC box and select the
> option "Lock Workstation"
> >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.

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



Fri, 31 May 2002 03:00:00 GMT  
 CTRL ALT CANC Keystrokes...

It's new to Win2K...

--
Michael Harris

  10Q Gnter 4 your suggestion, but the system reply to me:

  Error in user32.dll
  Missiong Entry: LockWorkstation

  What's wrong?

  .Enjoy.
  Legolas


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

  > >Hi all...
  > >
  > >Under NT4 i need to automatically call the CTRL ALT CANC box and select the
  > option "Lock Workstation"
  > >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.
  > >
  > >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



Fri, 31 May 2002 03:00:00 GMT  
 CTRL ALT CANC Keystrokes...
Ok for W2k, but something for NT?

.Enjoy.
Legolas



Sun, 02 Jun 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Sendkeys - Ctrl+Alt+Del

2. Ctrl + alt + del

3. ctrl + alt + del under win2000

4. CTRL ALT DEL in VBScript

5. CTRL+ALT+DEL

6. disable ctrl alt del

7. Trying to use SendKeys() to hit Ctrl-Alt-Del

8. Sendkeys ctrl+alt+del

9. Need a Ctrl-ALT-Del.vbs

10. {CTRL}{ALT}{DEL} w/ SendKeys ???

11. {CTRL}{ALT}{DEL} w/ SendKeys ???

12. sendkeys of ALT+CTRL+DELETE keys

 

 
Powered by phpBB® Forum Software