Set wshShell = WScript.CreateObject("WScript.Shell")
wshShell.SendKeys("^(%{DEL})")
"No-Spam" <nos...@nospam.com> wrote in message
news:3ab45c24....@msnews.microsoft.com...
"wmf" <wmf...@hotmail.com> wrote in message
news:OqKy7B7rAHA.2344@tkmsftngp05...
>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
>
>
>"No-Spam" <nos...@nospam.com> wrote in message news:3ab45c24....@msnews.microsoft.com...
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
"No-Spam" <nos...@nospam.com> wrote in message
news:3ab45c24....@msnews.microsoft.com...
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!