"Miztiik" <Miztiik[ at ]discussions.microsoft.com> wrote in message news:E8B9D1F9-113F-45E8-8C0B-CCB83B9845D0[ at ]microsoft.com...
[Quoted Text] > how to use rdp to connect to remote computer in vbs script. > > as of now the setup is like that > STEP 1 :: from my computer run "mstsc" to other computer > STEP 2 :: The remote computer, throws a security notice, i click "OK" to > get > thru > STEP 3 :: I type the UID and PWD and click connect > i am logged into the server. > > now i want to do this in a vbs
I doubt that mstsc will expose its methods in a COM object, so it might be that the only way to do this would involve sendkeys. That said, I am not too sure that this will work well.
You should keep in mind that those nuisance keystrokes you want to automate are there for security purposes. Beware of embedding a password in any script, and beware of sendkey'ing a password, as the window with the focus can change.
/Al
|