You are really having 3 problems: 1. How to access the logon window. 2. How to send Ctrl+Alt+Del. 3. How to do it on a remote computer. The rest is really simple. Problem 1. Windows Logon screen runs on a separate virtual desktop (screen) called WinLogon which is not accessible by regular programs and you cannot send keyboard or mouse events to that screen the way you can do it for other interactive programs. We have a utility called BindDesktop (see http://www.softtreetech.com/24x7/archive/43.htm) that can be used to run processes bound to a specific desktop. For example you can run a program or 24x7 job from a 24x7 service on the interactive user desktop using "WinSta0\Default" as the first parameter. I haven't' tried that but I think if you use "WinSta0\WinLogon" you can run a process on the Logon desktop. Having said that here is the problem 2. Problem 2. It is not possible to "press" Ctrl+Alt+Del by simulating keyboard events because winlogon.exe talks to the keyboard driver at a lower level. 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 (or any similar keyboard event simulation function) cannot duplicate. To bypass that some remote control programs like pcAnyWhere install special drivers that intercept system calls and chain into security procedure basically substituting certain system services. For more information see http://service1.symantec.com/SUPPORT/pca.nsf/docid/1997101214333 Problem 3. How to do it on a remote computer. And finally here is the solution. 1. Install and run 24x7 software on the remote computer and set it up to run in the Remote Agent mode. 2. Download and copy our Logon utility (http://www.softtreetech.com/24x7/archive/51.htm) to the remote computer. 3. On your server or workstation running 24x7 Scheduler schedule a job to run on the remote computer. This could be for instance a script type job like the following Dim ( pid, number ) RunAndWait( "logon.exe -p [password here]", "", 0, pid ) RunWithInput( "notepad.exe", "", 60, "hello world", 60, pid ) --------------------------- : I have a remote desktop Windows 2000 that I is typically "locked" : I need to be able to send a ctrl+alt+del followed by a password to unlock : system before I execute the rest of my JAL script. : I have tried to send the keys but because it doesn't behave correctly. : Anyone have any ideas on how i can accomplish this?
|