Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Ctrl+Alt+Delete in SendKeys

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,2224
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Ctrl+Alt+Delete in SendKeys
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Ctrl+Alt+Delete in SendKeys - 3/3/2005 1:22:02 AM   
  Normality

 

Posts: 16
Score: 0
Joined: 2/25/2005
From:
Status: offline
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 ?
 
 
Post #: 1
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/3/2005 2:07:14 AM   
  mbouchard


Posts: 1863
Score: 14
Joined: 5/15/2003
From: USA
Status: offline
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.

(in reply to Normality)
 
 
Post #: 2
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/3/2005 2:50:52 AM   
  Zifter


Posts: 318
Score: 0
Joined: 1/5/2005
From: Belgium
Status: offline
There was a discussion about this some weeks ago
[url="http://www.visualbasicscript.com/topic.asp?TOPIC_ID=1796"][/url]

HTH

(in reply to Normality)
 
 
Post #: 3
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/3/2005 4:56:56 AM   
  drbelden

 

Posts: 109
Score: 0
Joined: 12/21/2004
From: USA
Status: offline
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.

(in reply to Normality)
 
 
Post #: 4
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/3/2005 6:08:48 AM   
  Normality

 

Posts: 16
Score: 0
Joined: 2/25/2005
From:
Status: offline
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

(in reply to Normality)
 
 
Post #: 5
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/3/2005 5:26:27 PM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
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 ?

(in reply to Normality)
 
 
Post #: 6
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/3/2005 11:14:28 PM   
  Normality

 

Posts: 16
Score: 0
Joined: 2/25/2005
From:
Status: offline
well the keyboard was the only thing which got locked. so I dblclicked on the .vbs file again.

(in reply to Normality)
 
 
Post #: 7
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/4/2005 10:58:55 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
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 ?

(in reply to Normality)
 
 
Post #: 8
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/4/2005 2:03:08 PM   
  Normality

 

Posts: 16
Score: 0
Joined: 2/25/2005
From:
Status: offline
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.

(in reply to Normality)
 
 
Post #: 9
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/4/2005 3:08:30 PM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
ah. I see. heh.. always trying something different eh ?

(in reply to Normality)
 
 
Post #: 10
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/7/2005 2:19:55 AM   
  Country73


Posts: 712
Score: 8
Joined: 8/25/2004
From: USA
Status: offline
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.

(in reply to Normality)
 
 
Post #: 11
 
 Re: Ctrl+Alt+Delete in SendKeys - 3/7/2005 6:18:38 AM   
  token

 

Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
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.

(in reply to Normality)
 
 
Post #: 12
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Ctrl+Alt+Delete in SendKeys Page: [1]
Jump to:





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
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts