Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005
    Location
    England.
    Posts
    232

    Unanswered: Using SendKeys and doing Ctrl Alt and Delete

    I'm getting a bit annoyed here.

    Any ideas how to do a Ctrl Alt Delete using SendKeys at all??

    I'm trying everything I can think of, but can't get it to work.

    Any help, would be greatly appreciated!!

  2. #2
    Join Date
    Feb 2005
    Posts
    20
    here's something i found:

    Sorry. You CANNOT send the CTRL-ALT-DELETE sequence using Sendkeys. Ctrl-Alt-Del causes a hardware interrupt to occur, via direct wiring from the keyboard. It is a hardware interrupt generated by the keyboard. It's not the CTRL-ALT-DEL keystroke that is the problem, but that the keyboard makes a special type of hardware interrupt request to the cpu that SendKey cannot duplicate.
    The question is, why do you want the ctrl alt delete?

    If you want to shutdown, there are a number of reskit and shareware utils around, as well as Intcontrol 66, 67, or 68.

    If you want to logoff or change password, Winbatch will let you do that.

    If you want to run taskmanager run taskmgr.exe.

    If you want to lock the screen, locate and run the screensaver (or better yet, put it in a policy). Note that the SendKey code emulates the keyboard. If the workstation is locked, you cannot use SendKeys.
    You can't send the CTRL key by itself. You can ONLY send the Control key in conjunction with another key. For example:

    Sendkeysto("MS Word", "^v")

    where the caret "^" is the control key.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •