Solved

Set default printer for TS session

Posted on 2011-03-11
9
782 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:steveLaMi
9 Comments
 
LVL 14

Expert Comment

by:amichaell
ID: 35111322
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
 
LVL 8

Accepted Solution

by:
Acosta Technology Services earned 250 total points
ID: 35111338
Add the following to the user's login script if available:

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

0
 
LVL 11

Assisted Solution

by:yelbaglf
yelbaglf earned 250 total points
ID: 35111494
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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

Author Comment

by:steveLaMi
ID: 35141374
are those vbs scirpts?
0
 
LVL 8

Expert Comment

by:Acosta Technology Services
ID: 35141438
Yes, do you need batch?
0
 

Author Comment

by:steveLaMi
ID: 35141524
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
 
LVL 8

Expert Comment

by:Acosta Technology Services
ID: 35141572
Yes, it should be the exact name of the printer as installed on the user PC's
0
 
LVL 38

Expert Comment

by:hdhondt
ID: 35399242
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

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When I recently replaced my image transfer kit on my office HP color laserjet 5550dn printer, I had a slight problem.  The left bracket that holds the transfer kit got stuck in the upright locked position instead of being at a 45 degree angle facing…
Let’s list some of the technologies that enable smooth teleworking. 
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question