Remote Desktop And Serial Port Redirection

rmontz

New member
Joined
Apr 26, 2011
Messages
2
Location
USA, Pennsylvania
I have posted the details of what we are trying to do below. I would be happy with any and all suggestions.

Server: Windows 2008 R2 sp1, Remote desktop works however my Batch file for redirecting Serial Ports does NOT (see Below)
Client: Windows XP, MSTSC is set to allow serial port over network
BATCH FILE COMMANDS

Echo off
Cls
Echo Deleting old serial mappings
net use com5 /delete
net use com6 /delete
net use com7 /delete
net use com8 /delete
Echo Establishing new serial mappings
net use com5 \\tsclient\com1
net use com6 \\tsclient\com2
net use com7 \\tsclient\com3
net use com8 \\tsclient\com4



RESULTS

Echo Deleting old serial mappings.
Deleting old serial mappings.
net use com5 /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.

net use com6 /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.

net use com7 /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.

net use com8 /delete
The network connection could not be found.

More help is available by typing NET HELPMSG 2250.

Echo Establishing new serial mappings.
Establishing new serial mappings.

net use com5 \\tsclient\com1
System error 1200 has occurred.

The specified device name is invalid.

net use com6 \\tsclient\com2
System error 1200 has occurred.

The specified device name is invalid..

net use com7 \\tsclient\com3
System error 1200 has occurred.

The specified device name is invalid.

net use com8 \\tsclient\com4
System error 1200 has occurred.
 
I got it all figured out,

using windows 2008 server R2 SP1

you can not delete the ports prior to redirecting them

These are the steps I took to make this work

1) ALL SERIAL PORTS MUST BE DISABLED IN THE BIOS OF THE SERVER
2) Click Start
3) Click Run
4) Type cmd.exe in the textbox and click OK
5) Type set devmgr_show_nonpresent_devices=1 and hit ENTER
6) Type cd\windows\system32 and hit ENTER
7) Type start devmgmt.msc and hit ENTER
8) When the device manager opens, click the View menu
9) Click Show Hidden Devices
10) Click on the + sign next to the Ports to see the full list of Com ports being used.
11) Highlight the port you wish to delete and then press delete/uninstall. Accept when asked to
do so and continue with any more that you wish to delete.
12) Edit startup.cmd to match the current system configuration
a. Example Startup.CMD
Echo off
Cls
Echo Establishing new serial mappings
net use com1 \\tsclient\com1
net use com2 \\tsclient\com2
net use com3 \\tsclient\com3
net use com4 \\tsclient\com4
net use
Echo New serial mappings established...
PAUSE
 
Back
Top