Add AD printer globally as the default for multiple users on a PC

G

Guest

We are having trouble adding an AD printer globally as the default printer
for multiple users on a single PC. We have a script that will add a global
printer for multiple users on one pc, but cannot find one that will set that
printer to the default for everyone.

Can someone help me with this?
 
R

Ramesh, MS-MVP

Hi Katie,

Microsoft Windows 2000 Scripting Guide - Managing Network Printers:
http://www.microsoft.com/technet/scriptcenter/guide/sas_wsh_nuqj.mspx?mfr=true

[excerpt]

The SetDefaultPrinter method lets you assign a specific printer the role of
the default printer. SetDefaultPrinter uses the following syntax:
WshNetwork.SetDefaultPrinter(printerName)

The printerName parameter is the UNC name of the printer. (If the printer is
a local printer, you can also use a port name such as LPT1.) This script
sets the printer \\atl-ps-01\colorprinter as the default:
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.SetDefaultPrinter("\\atl-ps-01\colorprinter")

The SetDefaultPrinter method cannot retrieve the current default printer.

[/excerpt]

Examples - "SetDefaultPrinter" method
===========================

How to Add a Default Printer Using a Visual Basic Script:
http://support.microsoft.com/?kbid=263226

How To Set Which Printer Is the System Default Printer:
http://support.microsoft.com/kb/q266767/
(This one is for Microsoft Visual Basic, not for scripting)


Last but not least, here is the MSDN on "SetDefaultPrinter" method:
http://msdn.microsoft.com/library/d...html/66b55665-0ba7-4216-b3b3-06c9fb837f68.asp


--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


We are having trouble adding an AD printer globally as the default printer
for multiple users on a single PC. We have a script that will add a global
printer for multiple users on one pc, but cannot find one that will set that
printer to the default for everyone.

Can someone help me with this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top