Trying to use SendKeys() to hit Ctrl-Alt-Del 
Author Message
 Trying to use SendKeys() to hit Ctrl-Alt-Del

Hello:
I'm trying to use SendKeys() to hit Control-Alt-Delete, but I can't
get it to work.  I've tried a number of variations on the following,
but with no success-- any suggestions?
     Thanks!

Set wshShell = WScript.CreateObject("WScript.Shell")
wshShell.SendKeys("^(%{DEL})")



Thu, 04 Sep 2003 14:59:23 GMT  
 Trying to use SendKeys() to hit Ctrl-Alt-Del
SendKeys("{^}{%}{DEL}")


Quote:
> Hello:
> I'm trying to use SendKeys() to hit Control-Alt-Delete, but I can't
> get it to work.  I've tried a number of variations on the following,
> but with no success-- any suggestions?
>      Thanks!

> Set wshShell = WScript.CreateObject("WScript.Shell")
> wshShell.SendKeys("^(%{DEL})")



Thu, 04 Sep 2003 21:36:47 GMT  
 Trying to use SendKeys() to hit Ctrl-Alt-Del
forget it, that doesn't work


Quote:
> SendKeys("{^}{%}{DEL}")



> > Hello:
> > I'm trying to use SendKeys() to hit Control-Alt-Delete, but I can't
> > get it to work.  I've tried a number of variations on the following,
> > but with no success-- any suggestions?
> >      Thanks!

> > Set wshShell = WScript.CreateObject("WScript.Shell")
> > wshShell.SendKeys("^(%{DEL})")



Thu, 04 Sep 2003 22:13:29 GMT  
 Trying to use SendKeys() to hit Ctrl-Alt-Del

There's not a single word at the URL you referenced about how
Ctrl-Alt-Del is specifically ignored -- it's not there now, and it
wasn't there when I read the documentation before posting the question
to this newsgroup.  

Quote:
>When you encounter a problem with a object/property/method, it often helps to refer back to its
>documentation. This can sometimes save you a lot of frustrating minutes or hours trying to do
>something that *can't* be done. For example, take the SendKeys documentation. It clearly states that
>the system ignores the Ctrl-Alt-Del combination.

>http://msdn.microsoft.com/scripting/windowshost/doc/wsMthSendKeys.htm


>| Hello:
>| I'm trying to use SendKeys() to hit Control-Alt-Delete, but I can't
>| get it to work.  I've tried a number of variations on the following,
>| but with no success-- any suggestions?
>|      Thanks!
>|
>| Set wshShell = WScript.CreateObject("WScript.Shell")
>| wshShell.SendKeys("^(%{DEL})")
>|
>|



Fri, 05 Sep 2003 14:01:46 GMT  
 Trying to use SendKeys() to hit Ctrl-Alt-Del
hi no-spam,

Why do you want to ctrl-alt-del?  AFAIK, there could be only two reasons:

   - you want to shut down, or...
   - you want to terminate a misbehaving app.

You can do both of those from script.

There have been countless examples of how to shutdown or restart posted in
the wsh+vbs newsgroups.  You can search the archives with deja or google.

In addition, there have been countless examples of how to terminate an app.
Sendkeys alt-F4 usually works, as does the wmi process.terminate method.

cheers, jw


Quote:
> Hello:
> I'm trying to use SendKeys() to hit Control-Alt-Delete, but I can't
> get it to work.  I've tried a number of variations on the following,
> but with no success-- any suggestions?
>      Thanks!

> Set wshShell = WScript.CreateObject("WScript.Shell")
> wshShell.SendKeys("^(%{DEL})")



Sat, 06 Sep 2003 03:50:31 GMT  
 Trying to use SendKeys() to hit Ctrl-Alt-Del

Thanks, but it was to do a "Lock Computer" without using RunDLL32.exe
like in the following:

   Set wshShell = WScript.CreateObject("WScript.Shell")
   wshShell.Run "RunDll32.exe user32.dll,LockWorkStation"

Also, I wanted to experiment with a Group Policy startup script that
would hit Ctrl-Alt-Del, logon, etc. and see if it would actually work.
I know about the auto-logon registry feature that does the same thing,
but I thought it would be interesting to see about this for fun....

  Thanks Anyway!

On Mon, 19 Mar 2001 14:50:31 -0500, "jim_w"

Quote:

>hi no-spam,

>Why do you want to ctrl-alt-del?  AFAIK, there could be only two reasons:

>   - you want to shut down, or...
>   - you want to terminate a misbehaving app.

>You can do both of those from script.

>There have been countless examples of how to shutdown or restart posted in
>the wsh+vbs newsgroups.  You can search the archives with deja or google.

>In addition, there have been countless examples of how to terminate an app.
>Sendkeys alt-F4 usually works, as does the wmi process.terminate method.

>cheers, jw



>> Hello:
>> I'm trying to use SendKeys() to hit Control-Alt-Delete, but I can't
>> get it to work.  I've tried a number of variations on the following,
>> but with no success-- any suggestions?
>>      Thanks!

>> Set wshShell = WScript.CreateObject("WScript.Shell")
>> wshShell.SendKeys("^(%{DEL})")



Sat, 06 Sep 2003 07:53:50 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Sendkeys - Ctrl+Alt+Del

2. Sendkeys ctrl+alt+del

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

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

5. Disable (Ctrl+Alt+Del),(Ctrl+Esc),(Alt+Tab) in NT

6. Disable ctrl+esc ctrl+alt+del alt+tab

7. Block System Key like ALT+TAB, Ctrl+Alt+Del, Ctrl+Esc key

8. Disable (Ctrl+Alt+Del),(Ctrl+Esc),(Alt+Tab) in NT

9. Sendkeys - Ctrl+Alt+Del

10. sendkeys ctrl-alt-del ?

11. SendKeys with Ctrl+Alt+Del How????

12. Trapping CTRL+BREAK and CTRL+ALT+DEL

 

 
Powered by phpBB® Forum Software