Ctrl+Alt+Delete in SendKeys

Author Message
Normality

  • Total Posts : 16
  • Scores: 0
  • Reward points : 0
  • Joined: 2/25/2005
  • Location:
  • Status: offline
Ctrl+Alt+Delete in SendKeys Thursday, March 03, 2005 2:22 AM (permalink)
0
I've been trying for some time to send the "Ctrl+Alt+Delete" keys using SendKeys but none of the combinations I've tried work :

set shell = CreateObject("Wscript.Shell")
shell.SendKeys "^%{DEL}"

I saw somewhere that Ctrl = ^ and Alt = % and Delete = {DEL} but that won't do anything.
Anyone have an idea as to what I should use in order for it to work ?
 
#1
    mbouchard

    • Total Posts : 2110
    • Scores: 29
    • Reward points : 0
    • Joined: 5/15/2003
    • Location: USA
    • Status: offline
    Re: Ctrl+Alt+Delete in SendKeys Thursday, March 03, 2005 3:07 AM (permalink)
    0
    What are you trying to do?

    Also, if you want to send all 3 keys at once, I think the command is Shell.SendKeys ("^%{DEL}") I have not tested this, but this is what I got from the documents.
     
    #2
      Zifter

      • Total Posts : 315
      • Scores: 0
      • Reward points : 0
      • Joined: 1/5/2005
      • Location: Belgium
      • Status: offline
      Re: Ctrl+Alt+Delete in SendKeys Thursday, March 03, 2005 3:50 AM (permalink)
      0
      There was a discussion about this some weeks ago
      [url="http://www.visualbasicscript.com/topic.asp?TOPIC_ID=1796"][/url]

      HTH
       
      #3
        drbelden

        • Total Posts : 109
        • Scores: 0
        • Reward points : 0
        • Joined: 12/21/2004
        • Location: USA
        • Status: offline
        Re: Ctrl+Alt+Delete in SendKeys Thursday, March 03, 2005 5:56 AM (permalink)
        0
        If you are trying to do this to A locked station or one that is not logged in, I don't think there is a way to do that. Security built into Windows, though some have used remote programs such as VNC or PCanywhere to get around this. I think there is a Hey Scripting Guy article on Microsoft about this.
         
        #4
          Normality

          • Total Posts : 16
          • Scores: 0
          • Reward points : 0
          • Joined: 2/25/2005
          • Location:
          • Status: offline
          Re: Ctrl+Alt+Delete in SendKeys Thursday, March 03, 2005 7:08 AM (permalink)
          0
          I was just testing to see if it could be possible to launch start manager that way, but it isn't. Actually for shell.SendKeys "^%{DEL}" (which was what I initially tried), nothing apparent happens. However, for shell.SendKeys "^%{DELETE}", the first time I run that, it locked my computer, so I re-ran it to unlock. That only worked once though :s ...
          I checked that other thread and tried everything but nothing launched taskmanager that way. I know I can use shell.run to do that but I just wanted to test with SendKeys.
          Cheers and Thanks
           
          #5
            token

            • Total Posts : 1917
            • Scores: 0
            • Reward points : 0
            • Joined: 1/14/2005
            • Location:
            • Status: offline
            Re: Ctrl+Alt+Delete in SendKeys Thursday, March 03, 2005 6:26 PM (permalink)
            0
            I believe SENDKEY only sends a key combination to a specific application (whatever is the active one) intead of the system, that's why it didn't work.

            If it locked your computer the first time it is ran, how did you manage to run it the second time to unlock it while the system is locked ?

             
            #6
              Normality

              • Total Posts : 16
              • Scores: 0
              • Reward points : 0
              • Joined: 2/25/2005
              • Location:
              • Status: offline
              Re: Ctrl+Alt+Delete in SendKeys Friday, March 04, 2005 12:14 AM (permalink)
              0
              well the keyboard was the only thing which got locked. so I dblclicked on the .vbs file again.
               
              #7
                token

                • Total Posts : 1917
                • Scores: 0
                • Reward points : 0
                • Joined: 1/14/2005
                • Location:
                • Status: offline
                Re: Ctrl+Alt+Delete in SendKeys Friday, March 04, 2005 11:58 AM (permalink)
                0
                hmmm... how did CTRL-ALT-DEL lock a keyboard but not the mouse ? I think I'm confused by what you intend to achieve here. Did you want to use the script to lock a workstationo by using CTRL-ALT-DEl and click "Lock computer" button in the "Windows Security" window or was it something else that I completely missed ?

                 
                #8
                  Normality

                  • Total Posts : 16
                  • Scores: 0
                  • Reward points : 0
                  • Joined: 2/25/2005
                  • Location:
                  • Status: offline
                  Re: Ctrl+Alt+Delete in SendKeys Friday, March 04, 2005 3:03 PM (permalink)
                  0
                  nope, I wanted to see if it's possible to launch taskmgr.exe using shell.Sendkeys but it appears as though it isn't. I know I can launch it using shell.run "taskmgr" but just wanted to test with sendkeys really.
                   
                  #9
                    token

                    • Total Posts : 1917
                    • Scores: 0
                    • Reward points : 0
                    • Joined: 1/14/2005
                    • Location:
                    • Status: offline
                    Re: Ctrl+Alt+Delete in SendKeys Friday, March 04, 2005 4:08 PM (permalink)
                    0
                    ah. I see. heh.. always trying something different eh ?

                     
                    #10
                      Country73

                      • Total Posts : 754
                      • Scores: 10
                      • Reward points : 0
                      • Status: offline
                      Re: Ctrl+Alt+Delete in SendKeys Monday, March 07, 2005 3:19 AM (permalink)
                      0
                      Why don't you just try this:

                      set shell = CreateObject("Wscript.Shell")
                      shell.SendKeys "^+{ESC}"

                      Using Ctrl+Shift+Esc will launch the Taskmanager without regard to which window is active.
                       
                      #11
                        token

                        • Total Posts : 1917
                        • Scores: 0
                        • Reward points : 0
                        • Joined: 1/14/2005
                        • Location:
                        • Status: offline
                        Re: Ctrl+Alt+Delete in SendKeys Monday, March 07, 2005 7:18 AM (permalink)
                        0
                        Good point, apprently, CTRL-ALT-DEL doesn't work but CTRL-SHIFT-ESC will. So I guess my assumption on the requirement for an "application" for SENDKEYS to work is wrong.

                         
                        #12

                          Online Bookmarks Sharing: Share/Bookmark

                          Jump to:

                          Current active users

                          There are 0 members and 1 guests.

                          Icon Legend and Permission

                          • New Messages
                          • No New Messages
                          • Hot Topic w/ New Messages
                          • Hot Topic w/o New Messages
                          • Locked w/ New Messages
                          • Locked w/o New Messages
                          • Read Message
                          • Post New Thread
                          • Reply to message
                          • Post New Poll
                          • Submit Vote
                          • Post reward post
                          • Delete my own posts
                          • Delete my own threads
                          • Rate post

                          2000-2012 ASPPlayground.NET Forum Version 3.9