Set default printer for TS session

I have a user that logs into a terminal server from their XP embedded thin client.
The thin client has no printers installed locally.
The terminal server has the printers installed locally via IP to the printer
My terminal server and DC are Windows 2008

On a windows desktop pc the TS session would take the local PC default printer and make the TS session have the same default pritner. However, since I am using a XP Embedded thin client with no printer installed how can I specify what local TS printer I want to be default for a user?
steveLaMiAsked:
Who is Participating?
 
Acosta Technology ServicesConnect With a Mentor Commented:
Add the following to the user's login script if available:

Set WSHNetwork = CreateObject(“WScript.Network”)
WSHNetwork.SetDefaultPrinter “printer name¿

0
 
amichaellCommented:
This is probably best facilitated by using a logon script, such as KixTart.  With 2008 AD you might also consider GPO Preferences, though I've only used them to assign default printers in a shared printer environment and not to local IP printers.
0
 
yelbaglfConnect With a Mentor Commented:
You could try something like this in a login script...  This can also be expanded upon if needed.

On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colInstalledPrinters =  objWMIService.ExecQuery _
    ("Select * from Win32_Printer Where Network = FALSE")

For Each objPrinter in colInstalledPrinters
    If InStr(objPrinter.Name, "PrinterName") Then
    objPrinter.SetDefaultPrinter objPrinter
    End If
Next

Open in new window

0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
steveLaMiAuthor Commented:
are those vbs scirpts?
0
 
Acosta Technology ServicesCommented:
Yes, do you need batch?
0
 
steveLaMiAuthor Commented:
I can use the VBS, just want to make sure I do it right here

Is this what I should be putting in?
Set WSHNetwork = CreateObject(“WScript.Network”)
WSHNetwork.SetDefaultPrinter “Sharp MX-3100N PCL5C"

Of course, that is the model of the printer.

0
 
Acosta Technology ServicesCommented:
Yes, it should be the exact name of the printer as installed on the user PC's
0
 
hdhondtCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0
All Courses

From novice to tech pro — start learning today.