Link to home
Start Free TrialLog in
Avatar of ferrarista
ferrarista

asked on

VBSCRIPT - run RDP and launch program

Hi guys

I've been banging my head on this one.

I have a vbscript that dinamically launches RDP connections to some servers, and it works fine.

Now I need to add to this script to launch a specific command upon connection.
The MSTSC GUI does have this parameter ("Start the following program on connection"), but I'm unable to find someting useful to translate this for VBScript (ie command line).

Is there a way to do this outside the RDP GUI ? I'm thinking to modify the script and build an RDP file dinamically, but that would be quite some work! Is there an other way ?

Thanks!
Avatar of it_saige
it_saige
Flag of United States of America image

Just create an RDP file and use VBScript to run that file.  The RDP file can contain the command you want to run.

https://technet.microsoft.com/en-us/library/cc731192%28v=ws.11%29.aspx?f=255&MSPPError=-2147217396

-saige-
Avatar of ferrarista
ferrarista

ASKER

Well, it's not that easy. I know I can create an RDP file... I mentioned it in my question. The point is, can I do that by command line ?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Jeff Darling
Jeff Darling
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks all for you replies, so that's the way to go.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial