Set default printer at machine level

G

Guest

How can I change the default default printer in Win XP? Yes, I meant to say
"default" twice. What I want to set is which printer is the default as
different users log onto a particular station for the first time.

As people move from one desk to another within the network (Windows 2003
domain), they log onto a computer for the first time and get, for example,
the Microsoft XPS Document Writer printer as their default. However, the
default printer for the new user should be in close proximity to the
workstation, and the Microsoft XPS Document Writer is never a good choice.

Now, I know the Microsoft XPS Document Writer got to be the default somehow
and that the settings are likely sitting in the Default user's portion of the
registry just waiting for me to run a .reg file to correct the issue.
 
P

Pegasus \(MVP\)

Brian said:
How can I change the default default printer in Win XP? Yes, I meant to
say
"default" twice. What I want to set is which printer is the default as
different users log onto a particular station for the first time.

As people move from one desk to another within the network (Windows 2003
domain), they log onto a computer for the first time and get, for
example,
the Microsoft XPS Document Writer printer as their default. However, the
default printer for the new user should be in close proximity to the
workstation, and the Microsoft XPS Document Writer is never a good choice.

Now, I know the Microsoft XPS Document Writer got to be the default
somehow
and that the settings are likely sitting in the Default user's portion of
the
registry just waiting for me to run a .reg file to correct the issue.

You can do it like so:
1. Log on as an "average" user.
2. Set everything the way you want it, including the Default Printer.
3. Reboot.
4. Log on as Administrator.
5. Copy the "average" user's profile folder over the top of
the Default User profile folder. Click Start / Help, then look
for help on Profiles if unsure how to do this. It's covered
under "User Profiles Overview".

Every user who logs on to this PC for the very first time
will now inherit the settings you chose.
 
G

Guest

I had considered that, but I have to do this on at least 35 computers and was
hoping for just the printer registry entries that I can easily modify and
deploy to different machines.

I already have a simple .reg file that includes such things as default
folders for Word/Excel, turning off network printing notification, etc., and
it takes about 10 seconds to configure all those options for a new user of a
PC.

Still, I guess the profile option does cover all those bases, so it just
might be worth the work.
 
T

TH O

Brian said:
I had considered that, but I have to do this on at least 35 computers and was
hoping for just the printer registry entries that I can easily modify and
deploy to different machines.

I already have a simple .reg file that includes such things as default
folders for Word/Excel, turning off network printing notification, etc., and
it takes about 10 seconds to configure all those options for a new user of a
PC.

Still, I guess the profile option does cover all those bases, so it just
might be worth the work.

Try http://support.microsoft.com/kb/q189105/ for printui.dll. You'll
find more via google.
 
G

Guest

Thank you. I already use the PrintUI to install the printers. I was not
aware of the full set of switches. Perhaps the "/y" switch sets the printer
as the default printer for the default user, thus doing what I need it to do.
I will test it.
 
T

TH O

Brian said:
Thank you. I already use the PrintUI to install the printers. I was not
aware of the full set of switches. Perhaps the "/y" switch sets the printer
as the default printer for the default user, thus doing what I need it to do.
I will test it.

I don't recall if that is the switch but yes, it can set the computer's
default printer. There are three or four different ways to set that up
by script ...
 
A

Asher_N

I don't recall if that is the switch but yes, it can set the
computer's default printer. There are three or four different ways to
set that up by script ...


I use this login script that keeps network printers fresh, even if I have
to relocate them, and assigns the default depending on an AD group
membership.

-------------Begin script ---------------------------------------------
Const IT_GROUP = "cn=g-it,ou=security groups,dc=xyz,dc=corp"
CONst Payroll_Group = "cn=g-payroll,ou=security groups,dc=xyz,dc=corp"
Const PRT_ColourCopier = "cn=g-color copier,ou=security
groups,dc=xyz,dc=corp"
Const DFTPRT_accts = "cn=dftprt-accts,ou=security groups,dc=xyz,dc=corp"
Const DFTPRT_mkt = "cn=dftprt-mkt,ou=security groups,dc=xyz,dc=corp"
Const DFTPRT_whouse = "cn=dftprt-whouse,ou=security
groups,dc=xyz,dc=corp"
Const DFTPRT_AR = "cn=dftprt-ar,ou=security groups,dc=xyz,dc=corp"
Const DFTPRT_custserv = "cn=dftprt-custserv,ou=security
groups,dc=xyz,dc=corp"


on error resume next

Set wshNetwork = CreateObject("WScript.Network")
Set oShell = CreateObject("Wscript.Shell")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))


Set clPrinters = wshNetwork.EnumPrinterConnections
For i = 0 to clPrinters.Count - 1 Step 2
wshNetwork.RemovePrinterConnection clPrinters.Item(i+1), true
Next

wshNetwork.AddWindowsPrinterConnection "\\vmFS1\BackWhse"
wshNetwork.AddWindowsPrinterConnection "\\vmFS1\AR"
wshNetwork.AddWindowsPrinterConnection "\\vmFS1\custserv"
wshNetwork.AddWindowsPrinterConnection "\\vmFS1\whouse"
wshNetwork.AddWindowsPrinterConnection "\\vmFS1\mkt"
wshNetwork.AddWindowsPrinterConnection "\\vmFS1\accts"
wshNetwork.AddWindowsPrinterConnection "\\vmFS1\PickTick"


if instr(strGroups,PRT_ColorCopier) then
wshNetwork.AddWindowsPrinterConnection "\\vmFS1\ColourCopier"
End If

if instr(strGroups,DFTPRT_accts) then
wshNetwork.SetDefaultPrinter "\\vmFS1\accts"
End If
if instr(strGroups,DFTPRT_mkt) then
wshNetwork.SetDefaultPrinter "\\vmFS1\mkt"
End If
if instr(strGroups,DFTPRT_whouse) then
wshNetwork.SetDefaultPrinter "\\vmFS1\whouse"
End If

if instr(strGroups,DFTPRT_AR) then
wshNetwork.SetDefaultPrinter "\\vmFS1\AR"
End If

if instr(strGroups,DFTPRT_custserv) then
wshNetwork.SetDefaultPrinter "\\vmFS1\custserv"
End If


-----------------End script ---------------------------------
 

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