Link to home
Start Free TrialLog in
Avatar of Dwight Baer
Dwight BaerFlag for Canada

asked on

How to quickly set a new printer as the default for all users?

I just added a new printer on my Windows Vista (or XP) machine.  How can I quickly set this printer as the default for all users?
When I log in as a different user, the printer is there as one of the printer choices.  But it's not the default until I manually set it to be the default for each user.
Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Fess332
Fess332

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 Dwight Baer

ASKER

Wow.
If my printer name is "LJ4350" and the .inf file is in "C:\4350", for example, can you give me the syntax to add this as the default printer in a login script?  The printer driver files are already installed for one user on the computer.
OK ... I'm working on this ... at the following site ...
http://www.robvanderwoude.com/2kprintcontrol.html

I found:
Set printer as default  -
RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "printer"

But when I put this line into a .bat file and run it from the command line, I get the following error:

Operation could not be completed. Either the printer name was typed incorrectly, or the specified printer has lost its connection to the server.  For more information, click Help.


P.S.  I copied the printer name directly from the Properties window of that printer.  In this case, for the printer that shows up in the description as "NPI612E34 on http://192.168.0.158", the Proprties shows a name of "NPI612E34".
P.P.S.  Here is the entire file that I called "aaa.bat":

RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "NPI612E34"
At the following Microsoft site:
http://support.microsoft.com/kb/314486/ ... it says:

Windows XP permits you to install a printer from the command line. This is particularly useful when you use a logon script or a scheduled event to add or remove a printer from a group of users.
Type (for example):
rundll32 printui.dll,PrintUIEntry /?

But ... on my Windows XP Professional machine, with SP3 installed, there is no rundll32 command.  What's going on?
Hey Fess32 or anyone,
Thanks for the tip about using rundll32.  But you haven't responded with a sample syntax.  And what about "There's no rundll32 in my Windows XP environment?"
I think this is a tough question.  Maybe there are sample scripts out there?
Thanks a lot.
Update:  I just received an e-mail from Experts Exchange reminding me of this open question.  It's been open for a week.  Meanwhile, I only received one response.  As I indicated in my subsequent post:
- First of all, it would be very helpful to see a sample syntax for the rundll32.exe command.  The "Usage" output is pretty deep.
- Secondly, my computer doesn't even have the rundll32.exe command in its environment.

What is one supposed to do on Experts Exchange when the only response one gets to a valid question is a) not very helpful and b) mostly irrelevant for my situation?  

I'm leaving this question up because I think it's a good question and I believe there's an answer out there.  At the very least, there should be an answer with regard to what OS's typically have the rundll32.exe command in their environment.

I remain thankful, as always for Experts  Exchange!!!
OK ... I think I have egg on my face.  I found rundll32.exe in the System32 folder on an XP machine with SP3 installed.  Not sure why it wasn't there the other day I looked.  

At http://vlaurie.com/computers2/Articles/rundll32.htm  there are some good tips about rundll32.exe.
Also http://www.robvanderwoude.com/rundll.html

I think I'll close this now.
I think this was a very tough question to answer.  But nevertheless, after a week of having this question open, Fess32 didn't reply with any response to my repeated follow-up posts.