jeepr94
asked on
Printers in mulitiple sessions on one Terminal Server
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.EnumPrinterConn ections
For Loop_Counter = 0 To Printers.Count - 1 Step 2
WSHNetwork.RemovePrinterCo nnection Printers.Item(LOOP_COUNTER +1)
Next
Select Case Left(strClient,7)
Case "WHFCLBO"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\ProviderHP2 055"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\SecureRX"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\Label1"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\RICOH"
wshNetwork.SetDefaultPrint er "\\192.168.1.2\ProviderHP2 055"
Case "WHFCLEX"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\ProviderHP2 055"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\SecureRX"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\Label1"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\Exam1"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\Exam2"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\Exam3"
WshNetwork.AddWindowsPrint erConnecti on "\\192.168.1.2\Exam4"
End Select
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.EnumPrinterConn
For Loop_Counter = 0 To Printers.Count - 1 Step 2
WSHNetwork.RemovePrinterCo
Next
Select Case Left(strClient,7)
Case "WHFCLBO"
WshNetwork.AddWindowsPrint
WshNetwork.AddWindowsPrint
WshNetwork.AddWindowsPrint
WshNetwork.AddWindowsPrint
wshNetwork.SetDefaultPrint
Case "WHFCLEX"
WshNetwork.AddWindowsPrint
WshNetwork.AddWindowsPrint
WshNetwork.AddWindowsPrint
WshNetwork.AddWindowsPrint
WshNetwork.AddWindowsPrint
WshNetwork.AddWindowsPrint
WshNetwork.AddWindowsPrint
End Select
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER