Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using local USB ports on a terminal server session 1

Status
Not open for further replies.

SkyhiKeeper

Programmer
Jan 6, 2004
22
ZA
Is it possible to use the local resource USB ports on a terminal server session ?
I can get serial and printers and drives
 
Runthe attached script logged in as the user. You will need to execute it for each user on computer since it writes to the HKCU folder. Here is what you need....


'==========================================================================
'
' NAME: TSPrintFix.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: ' (c) 2003 All Rights Reserved
' DATE : 12/22/2003
'
' COMMENT: Fixes printing via terminal services to allow DOT4 printers
'
'==========================================================================
myPrompt = MsgBox("This script will set up your printers for use with Terminal Services",vbOKCancel,"Setup Printers for Terminal Services?")
If myPrompt = 1 Then
Set WshShell=WScript.CreateObject("WScript.Shell")
keypath ="HKCU\Software\Microsoft\Terminal Server Client\Default\AddIns\RDPDR\FilterQueueType"
WshShell.RegWrite keypath, -1, "REG_DWORD"
If WshShell.RegRead(keypath) = "-1" Then
MsgBox "Setup was successful",,"Success"
Else
MsgBox "Sorry A Problem Was Encountered" & vbCrLf & "Make sure you have permission to write to the registry.",,"Something went wrong"
End If
End If
WScript.Quit
 
I understand that this will work for a printer will it work for a USB Web Cam?
 
That is untested, but I think it will. Since it allows the TS Box to redirect the USB for a Printer, I see no reason it would not work for a camera. You will probably have to load the camera drivers on the TS Box ahead of time.
 
That looks good, I am not to ofay with vbscript but it loos like it is just a matter of editing a registry key or am I incorrect, following this if it is just the reg key would I be able to edit it through regedt32 ?
 
You are correct. If manually editing and creating the DWORD, you want to set the value to FFFFFFFF. The VBScript does the same thing when using -1.

MSKB 302361 has details on it. I found it easiest to use the script so I could have the users do this themselves.

If you have locked the users out of registry editing tools, my script is your only option, OR you can export a reg file and double click it to import into their registry.

Just remember that this writes to the current user, so you have to be logged on as the user.
 
Just one more point would this be executed in the terminal server session or on the machine connectiong to the terminal server prior to connection ?
 
You need to run this ont he workstation prior to connecting with Terminal Services.

Also, make sure you client is using the new RDP5 client software. XP and Win2K3 ship with it, if your clients are Win2K, install the updated client software from the Win2K3 server.
 
Have tried to test this and if I look at the printers setup it idicates the new USB Shared port, however I cannot get the local camera working in the terminal server session.....
 
That is disappointing. Did you try to install the camera on the server?
 
Yes the camera on the server worked fine, It seems that there is no way actually to say to the camera driver which usb port to use, I would asume that if this wa possible then you could use a redirected port.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top