Solved

RDP session scripting

Posted on 2009-07-12
3
830 Views
Last Modified: 2013-11-21
Is there a way to script an RDP session? We have a farm of Terminal Servers and there is an application on one Terminal Server that for various reasons can't be installed on any other Terminal Servers.  Is there any way that I can script an RDP session from the other Terminal Servers that would RDP into the 'special' TS and automatically run the program so that it would be transparent for the user e.g. they would just click on an icon and after a few flashes they would be getting the splash page of the  target program running on the 'special' Terminal Server and when they exited the program it would take them back to their own TS.  I know about application virtualization and the products for it but that's not on for this situation. Home made solutions are all that's allowed by this budget.  The servers are running Windows 2000 TS.
0
Comment
Question by:lineonecorp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 300 total points
ID: 24836091
Hmm - I can't say for certain if this is possible with W2k, but it is with W2k3.
Click Start->Run->mstsc <Enter>

Now, you would adjust the session as needed (may have to click Options first).
From the Programs tab, there's a check mark to 'run this program' on connection - enter the application there after checking the box.
Click OK (after making any other needed adjustments).

Now click Save As and save it in the windows\system32 folder as "special.rdp"

Now create a desktop shortcut that launches a single-line batch file containing:

where SERVERNAME is the 'special' server's computer name...


@mstsc "%systemroot%\system32\special.rdp" /console /v SERVERNAME

Open in new window

0
 

Author Closing Comment

by:lineonecorp
ID: 31602646
Great little trick. I can see a lot of uses for this. Thanks.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 24838262
Glad I could help.
I use that batch file quite often...
Mine is a bit longer and targeted for different scenarios - perhaps you'll find use for it as well.
I've named it cnx.cmd, also stored in my system32 folder, so I can click Start->Run-> cnx servername <Enter>
which allows the servername as a parameter - different servers provide different scenarios (just an example - can be broadened to include multiple servers):
@echo off
set srv=%1
 
If [%srv%]==[] goto usage
If /i [%srv%]==[server1] set parm=/console
 
mstsc %systemroot%\system32\nonconsole.rdp %parm% /v %srv%

Open in new window

0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question