Set the default printer with a script

  • Thread starter Thread starter gregb369
  • Start date Start date
The help available from "rundll32 printui.dll,PrintUIEntry /?" says that the
following command will do the trick.

rundll32 printui.dll,PrintUIEntry /y /n "printer"

I'm not sure exactly what is expected as the "printer" field, but I'm sure
you'll find out if you do some experimenting.

Hope this helps

Oli
 
rundll32
printui.dll,PrintUIEntry /in /n"\\computername\HP
LaserJet 1010"

rundll32
printui.dll,PrintUIEntry /in /n"\\computername\HP
LaserJet 1010" /y

I found i needed to add it for the user (/in) and then
use the same line with the /y at the end to make it
default. Works fine in a batch script.

Tim
 
rundll32
printui.dll,PrintUIEntry /in /n"\\computername\HP
LaserJet 1010"

rundll32
printui.dll,PrintUIEntry /in /n"\\computername\HP
LaserJet 1010" /y

I found i needed to add it for the user (/in) and then
use the same line with the /y at the end to make it
default. Works fine in a batch script.

Tim

Is there a way to configure that command to include a username and password
in it for a print server that pops up an authentication dialog?
 
None documented. I would be surprised if there was a way. Why are you
being prompted to authenticate? Is the machine not in the same domain or a
trusted domain? I can't see why anybody would want to configure a print
server any other way.

Regards

Oli
 
None documented. I would be surprised if there was a way. Why are
you being prompted to authenticate? Is the machine not in the same
domain or a trusted domain? I can't see why anybody would want to
configure a print server any other way.

It's a large college where the domain admin and lab staff aren't
coordinating. The default lab profile prevents deleting printers. So the
lab staff logs off the default domain user logon and logs onto the local
system with the administrator password to make printer changes.

Regards

Oli



Is there a way to configure that command to include a username and
password
in it for a print server that pops up an authentication dialog?
[/QUOTE]
 
Back
Top