Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Logon to Terminal Server with command line options

Posted on 2004-10-29
15
Medium Priority
?
1,263 Views
Last Modified: 2011-10-03
I need to switch the default printer for a Terminal Server client - printer1 for local default, Printer2 for TS default. I think I can do this with a script or reg file. I want to wrap the whole thing in a single script/bat file. How do you connect to Terminal Server with a command line - including the server name choice so it goes right to the connection, no boxes to click until you logon to Terminal Server?

I tried the command line with the IP, "Connect IP", and other guesses but no luck.

George
0
Comment
Question by:George46227
[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
  • 9
  • 5
15 Comments
 
LVL 9

Expert Comment

by:BigC666
ID: 12453617
howdy,

have a look at this http://www.rlmueller.net/CreateUsers.htm

hope that it helps
0
 

Author Comment

by:George46227
ID: 12454932
Either you posted to the wrong thread or maybe misunderstood the question. The link does not seem to have anything to do with connecting to Terminal Server with a command line/batch file. Help is always appreciated but I don't think we are "on the same page".

George


0
 

Author Comment

by:George46227
ID: 12655685
11/23/04

So far I have not received a response which provides an answer to the question. I am looking for the command line to launch a Terminal Server client connection, including any parameters/arguments. In NT you can make a dial-up or VPN connection to a remote machine from a BAT file using rasdial.exe plus some parameters. In Win98 you can do something similar using rundll32.exe with a ras dll file and connection name. I want to connect to a Terminal Server using a BAT file thus I need the command line.

If there are no further responses in the next few days I will request the EE admins to close the question with no points awarded.

George
0
Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

 

Author Comment

by:George46227
ID: 12683191
11/26/04
3:27pm

I am going to do a pointer question to get some new responses.

George
0
 
LVL 88

Accepted Solution

by:
rindi earned 1000 total points
ID: 12684650
If the TS Client you are using is the version coming with windows xp (you can, as far as I know, download the client for use on other OS's from M$), you can start a command prompt, then enter "mstsc /?"
A windows will now open with your possibilities, ie:

/v:server:port -> this would be your TS ip address and if you aren't using the standard 3389 port you would also enter the port.
/console -> you get the actual server's logon screen (the local display will get locked.)

and so on.

You can combine these command line options with .rdp file. This is a file you can create when you start the client from windows, you get the options you can enter, and then save as...

The above commands can give different results depending on the version of TS running on your server. If it is a windows 2000 server, you won't be able to use the /console switch, for instance.

Hope I was able to help or at least point you in the right direction
0
 

Author Comment

by:George46227
ID: 12686948
rindi
11/27

I am running w98se client from TS W2K. When I run the mstsc.exe /? (or /help, -?, -help) the TS client window pops up instead. mstsc.exe /v:ipaddress same thing. Am I having a syntax problem or does this client not support the command line ? I am running client 5.00.2195.3895. Will xp ts client work with w98se for TS W2K? Do you have a link where I can dl it? Also any reference article for the TS command line use?

Thanks
George
0
 

Author Comment

by:George46227
ID: 12686960
rindi
11/27

also - I don't find any .rdp file - how do I create and use it?

George
0
 
LVL 88

Expert Comment

by:rindi
ID: 12694282
I wouldn't know about clients for Windows 98. Try downloading this from the M$ site, Possibly the command line options will be the same here. An rdp file will be created when you start the client, but do not logon yet. You can define diverse settings like resolution etc. You can then save these settings and the result will be a .rdp.
0
 

Author Comment

by:George46227
ID: 12698427
11/29/04
rindi

I installed the XP version on a Win98 pc (a different pc just for testing the install and command line), now I can do /? and see the options. Now about installing the XP version on my "production" TS client - can this XP version and the old W2K version run side-by-side on the my "real/production" W98SE TS client machine - I prefer not to do an "un-install" - the machine is used for TS admin and testing and is a very important machine, I am afraid I will mess up the TS client license. I am afraid to use the other pc that I installed the XP TS client on to make an actual connection to the TS - it might issue a license which I don't want to eat up another client license just for testing.

George
0
 

Author Comment

by:George46227
ID: 12698675
11/29/04

Just a FYI for everyone - I believe you can run TS client from a batch file this way (using the W2K TS client):

Go to TS Client Client Connection Manager
set up the connection:
0
 
LVL 88

Expert Comment

by:rindi
ID: 12698766
If the Program name is different, then there shouldn't be any problem in running both versions parallel. The license shouldn't be touched if you use a different client. I'm not sure how M$ determines a what client is authorized, probably it'll depend on the OS type running on that PC and the PC's name (or the MAC address of the NIC). You may have to get in touch with M$ to make sure. But it definitly isn't a license violation if you have already licensed the machine and are just using another version of the client on it.
0
 

Author Comment

by:George46227
ID: 12698914
11/29/04

SORRY! I hit a wrong key and lost my window!

To continue the previous post:
Client Connection Manager:
     New Connection and follow the wizard
     use the Properties later if you want to edit the connection
     you will have a connection name, server name/ip address, log on automatically option, screen size, startup in full or window, data compression, bitmap caching, startup program

so go to the command line: "mstsc.exe MyConnection" and you will get connected using whatever info and options you specified during the set up of the connection.

I think this will probably run in a batch file - don't see why not. I want to use it to run a .reg file to automatically re-set a user's default printer when they connect and dis-connect to the TS. Like:

printer1.reg
mstsc.exe MyConnection
printer2.reg

George
0
 

Author Comment

by:George46227
ID: 12709776
rindi
11/30/04

Just FYI for everyone - when you install the WinXP version of TSclient/Remote Desktop - it will remove your other version of TS client, so a parallel setup does not seem possible. It does migrate your previous settings - acts like an "upgrade". It appears in ADD/Remove and Start > Programs as "Remote Desktop Connection" - not Terminal Service Client. It did not give me a choice to "upgrade" or not.

About the .rdp file - opened in Notepad, it appears mixed text/binary. I assume you can not directly edit or manually create an .rdp file - the only way is to configure a setting thru the GUI which then builds the .rdp file? Have you had any experience using the GUI to build .rdp files and then distributing the .rdp files to other pc's (to save time having to go to each pc and manually setting up the connection)? That is - can I take the .rdp file from my pc and copy it to another pc and use it (assuming the same version, etc.)?

Also when running mstsc.exe - can i point it to a .rdp file for the connection setup - like "mstsc.exe MyConnection.rdp"?

Thanks
George
0
 
LVL 88

Expert Comment

by:rindi
ID: 12715939
I don't think you can directly edit an .rdp file, I also had to create them using a GUI. I have distributed one to other systems and it worked, but those were all quite similar, so I'm not sure if it will work on a PC which, possibly, uses a complete different resolution.

Yes, you can start the .rdp file from the command line (your example above uses the correct sysntax!).
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
With the evolution of technology, we have finally reached a point where it is possible to have home automation features like having your thermostat turn up and door lock itself when you leave, as well as a complete home security system. This is a st…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

636 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