We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Printers in mulitiple sessions on one Terminal Server

Medium Priority
532 Views
Last Modified: 2012-05-11
hello, our client uses Windows 2003 for terminal servers in a 2x farm (group of 2003 terminal servers). Basically we have a script that will give a computer a set of printers based on the computer/thin client name they use to connect to that terminal server. The problem we have is a bit hard to explain but here goes:
Let say we have  ThinClient1 that is in the admin area and we have Thinclient100 that is in the HR department.

When user Bob connects to Thinclient1 from Admin he gets the proper set of printers and the right deafutl printer based off script .

Then Bob decides to go to Thinclient100 at the HR department. He will then get the proper set of printers and the correct default printer.

The problem is when bob goes back to his Thinclient1 session taht he did not log out of, he will see the printers that are meant for the HR deparmtent.

So the problem is where the user logs in last is what printers ALL his sessions on the terminal server will get.

The script appears to work just find because everytime it runs it gives the proper set of printers it just affects other sessions of the same user on that terminal server. Here is a clip of the script we use:


Set Printers = WshNetwork.EnumPrinterConnections
For Loop_Counter = 0 To Printers.Count - 1 Step 2
     WSHNetwork.RemovePrinterConnection Printers.Item(LOOP_COUNTER +1)
Next
Select Case Left(strClient,7)


Case "WHFCLBO"

            WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\ProviderHP2055"
                WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\SecureRX"
                WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\Label1"
            WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\RICOH"
            
            wshNetwork.SetDefaultPrinter "\\192.168.1.2\ProviderHP2055"


Case "WHFCLEX"

            WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\ProviderHP2055"
                WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\SecureRX"
                WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\Label1"
            WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\Exam1"
            WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\Exam2"
            WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\Exam3"
            WshNetwork.AddWindowsPrinterConnection "\\192.168.1.2\Exam4"
End Select
Comment
Watch Question

Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.