Jump to content

Problem With "secure" Terminal Server Scripting


Recommended Posts

Heya guys,

I couldn't find any prior posts with exactly this issue, so forgive me if it's been asked before...

I'm trying to make a script that logs on to my company's terminal server and then launches a couple of programs on that server.

Problem is: Our terminal server appears to be fairly "secure" in that it won't accept what I call "pre-authentication"... i.e. I can't send my username & password with the initial login request like a regular RDP shortcut. It forces me to type the un/pw in at its own "Logon to Windows" screen.

I can get AutoIt to bring up the mstsc app and connect to the server... easy enough. But I can't seem to send any keys through the rdp window once I do. Is there a fancy way to do this or is it just not possible?

Link to comment
Share on other sites

I'm running MSTSC on XP Pro.

Send() works, but none of the controls seem to accept keystrokes.

My output from WinGetClasses() is:

TSCAXHOST
ATL:6A67B198
UIMainClass
BBARCLASS
ToolbarWindow32
ToolbarWindow32
UIContainerClass
IHWindowClass
OPWindowClass

While it's possible to send keys, there are many limitations. Getting the password setting changed on the server side only helps with the logon process... at that point you still need to launch your programs.

I think you'd be better off with an alternative remote execution method like WMI, scheduled jobs, xCMD, or PSExec.

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...