Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printers for all 14

Status
Not open for further replies.

kjb21

MIS
May 23, 2003
7
0
0
US
I have an XP Pro computer that I setup on my domain. Loaded the printers under my Domain admin account. When another user logs on they do not see the printers. I'd like all users to have the printers when the log-on.
 
OK, say we have a system which requires the printers to be mapped to LPT1, but also need to select from a list of say another 4 printers for Windows application printing?

At the moment we have a login script mapping a particular printer to LPT1, but we have to map the other network printer within Windows NT ourselves.

Obviously from the previous tip we've been able to fully automate Windows 2000 - is it not possible that way with NT (or do we need to give each printer a seperate LPT port?)

Cheers

Mark
 
What is nice about XP as a network client is that all available shared printers on the network will populate the Printer and Fax connection wizard without user intervention if a share has been published for the device on the network.

Which is fine for "Windows Aware" software and XP clients. What was used above as a solution was to create a folder on the server with essentially seperate batch files to do the printer assignments. Place a shortcut on the user desktops pointing at this shared folder. The folder will contain n number of batch files, all with the same assignment statements I mentioned above:


rem Clear existing assignments
net use lpt1: /d

rem Add Printer HPLaser4 on Server Back_Office
net use lpt1: \\Back_Office\HPLaser4 /persistant:yes

rem ==== end of batch file

Give each a descriptive name. You will notice I added a persistant switch. This tells Win98 -->XP that the assignment will persist until changed, so that once an assignment has been made it will, without user intervention, persist through their logons over time until changed by selecting a different batch file.

You might want to make the batch files read-only.

 
Also you can use the command when setting up a computer and you want ALL the users using that computer to have a base set of installed printers. You need to have Administrator privileges when doing this and is an alternative to the at-login-time concept described above.

Code:
rundll32 printui.dll,PrintUIEntry /ga /c\\thisCpuName /n\\PrServerOrHostCpu\PrShareName

Then stop and restart the print spooler (or log off and back on).

Code:
sc \\%1 stop spooler
sc \\%1 start spooler

To delete what you did with /ga, just re-run it with /gd. Here "ga" means global add and "gd" means global delete, within the scope of the computer, of course, this does not extend to other networked computers.

BCastner helped me find it at B. Sanderson's page:
 
Hello,
I have a situation where I would like to use a batch file I have created with all the printers needed, in the \allusers\startmenu\programs\startup folder so that whatever user logs in, it will add these specific printers. I actually have 50 Zebra label printers that I need to add so that users can monitor print jobs. This works for the most part but when the batch file runs, if the system cannot connect to a printer, an error occurs and the user needs to click OKAY before the batch file continues. This gets time consuming with 50 printers. I know definitely that the printers that the error occurs on are connected to the network. I can ping all of them. Does anyone know of a way to "turn off" checking the network connection or why this might be happening? Thanks in advance for any help given! - Sue
 
Add the quiet switch to each rundll32 entry:

/q quiet mode, do not display error messages
 
Thank you so much for your reply BCASTNER. That worked like a charm!!
 
Shiny pointy thing for D99. Saved me from having visit 20 people to add a new printer.

dorsetlass,
Copy the code that D99 shows (supplying the needed server - printer info of course) into a new Notepad session. Save the file as .bat file. Then all you need to is double click the file you created. This method should work. I did it using XP Pro and a windows 2000 server.

Mike
 
I just found this thread and must say that Dillinger99 is the bomb! You have saved me lots of API coding calls just by this one command line. Thank you and have a star!

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
This is just what I need for installing printers via a script on users computers.
However, the /q option doesn't suppress a driver installation message.
There is an option for the command which is mentioned in the help (super quiet mode).

"/G[flags] specifies global flags and switches
w suppress setup driver warnings UI (super quiet mode"

however, I've been unable to get this "super quiet mode" option to work.

Has anyone been able to use this /G w option for this command?
I can't work out quite how to use it and suppress the driver download warning...

any info welcomed!
 
I have a situation where I need to REMOVE all of the printers that were previously installed using a printer batch file in Startup with the rundll32 printui.dll,PrintUIEntry /ga /in /n command and switches. Does anyone know of a way to remove the printers using the same batch file in startup? (I have 50 printers that have been installed on about 50 computers for multiple users.) The printers will now be locally installed. Users will be connecting to Terminal Server and each connection loads all 50 printers! This is why they now need to be removed. Thank you in advance for any help with this! Suelew
 
werks like a frigging charm! this is the thing ive been looking for for months...

thanks,

Dave
 
I shared a printer on Windows Server 2003 and use the above command to install the printer using .bat file at logon..

rundll32 printui.dll,PrintUIEntry /in /n \\servername\sharename

logged on the client machine a regular "user" permission account.

it gets the error "You do not have sufficient access to your computer to connect to the selected printer."

I checked "point-and-print functionality" in the gpolicy on the server and allows the user to add the printer.as suggested from (
i also checked to see if the /%systemroot%/system32/spool folder is read and list content as suggested another site.

i also tried:
# Go to Local Computer Policy, Computer Configuration, Security Settings, Local Policies, User Rights Assignment
# Double click Load and unload device drivers

and add the "user" group to the permissions.

nothing works.. what can i do so the "users" can add the printer at startup?

thanks
 
I tried to add the printer using the "Add Printer" wizard and then I used "Find a printer in the directory" look in the active directory found the printer which i tried using the script to add.. selected the printer and clicked "ok" it proceed to add the printer. and the printer was added..

I was still using the "user" account.. so why can't the bat file work?

 
update:

I removed the printer that was added through the print wizard... and logged off.. then i proceed to log on with the "user" account and it added the printer using the batch file without any problem.. so my guess is that it needed the drivers... how would i be able to direct the batch file to find the drivers if it did not have it localy?

should i map a drive to the server or where ever there is the drive files? using the "rundll32 printui.dll,PrintUIEntry /in /n \\servername\sharename /l z:/driver/driver.inf" switch ?

 
The printer share server service will push the drivers.
Discussion:

The only "gotcha" is if the drivers do not use the plug and play interface, and the user is a limited user. In that instance use NTRIGHTS to allow the user to load and unload device drivers:

 
Thanks for the links, I've visited them except for the ntrights.exe one.

Question: how do I know if the driver I am using is Plug and play? Ex. I am trying to map a HP laserjet 1320n printer.

are there no other way to allow regular "Users" to install the drivers?

thanks

 
Thanks Bcastner,

I will give it a try.

I'll post the results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top