Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm trying to write a simple batch file to take a remote desktop connection. But I'm not getting how to pass a program name, that I want to run on the remote system immediately after rdp session is created.

Note: Using RDP client we can specify this thing under "Programs" tab.
Posted

1 solution

Using the RDP client, set proper settings and then in General tab you can save the settings as a .rdp file.

Then again this file can be used as a parameter when executing RDP from the command line. See Use command line parameters with Remote Desktop Connection[^]
 
Share this answer
 
v3
Comments
Deekshith Narayanam 23-Jan-15 2:02am    
Thanks for reply.

This would not be portable solution, right?. I mean, if i want to use the batch file on some other system, then I will have to do the same thing from RDP client on that system also. But I don't want to do that. I just want to send the batch file to other system and execute it there.
Wendelius 23-Jan-15 2:33am    
As far as I can see this is a portable solution as long as you also send the rdp file. The rdp file is actually a simple text file. You can use notepad to open it and see the content.
libin0410 18-May-15 4:36am    
did you resolve this problem ? i am doing this too!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900