Link to home
Start Free TrialLog in
Avatar of JeffBeall
JeffBeallFlag for United States of America

asked on

set default printer for all users win7

I'm using the following command to try and set the default printer for all users on a win7 box

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

I have this command in a batch file and I was going to plop it in the startup folder for all users.
But when I test this batch file I get this error

"Operation could not be completed ( error 0x00000709 ). Double check the printer name and make sure that the printer is connected to the network."

I copied the name out of the printer properties, and can ping the name.
I even copied the whole rundll32 command from the help file you get when you type

"rundll32 printui.dll,PrintUIEntry /?"

So I'm not sure what I'm missing, any ideas?
SOLUTION
Avatar of Randy Downs
Randy Downs
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JeffBeall

ASKER

it needed the unc path name so

"\\server\D59NSI03M1"

It wants the quotes too

Thank you for the help.