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!

Mapping printers on logon 1

Status
Not open for further replies.
May 12, 2002
51
0
0
US
I have 4 network printers that I need to mapy for every user. We have 4 PC's I need to map on. How do I create a batch file that will map all 4 printers? I want to place the batch file in everyone's startup folder?

Help!

Thanks Thanks!
-JusTin
 
Thanks for the site. I tried doing what it said, but obviously didn't do it right, because it didn't work. ;o)

Here are the printers I need to map:

\\PRN-NOC3\LaserJet Printer under NOC M&C Console
\\prn-noc1\EPSON Stylus Photo 1280
\\PREMPDC\NOC_Shop
\\PREMPDC\HP Color LaserJet 4500 PCL 5c

How can I put those into a login script to map and add to printer menu? Thanks!
-JusTin
 
Why so determined to do this with a script? I could understand if it was hundreds of PCs but you said it's only 4. Why not just map to these printers normally?
 
Because, we have like 20 users on these 4 machines. The same printers need to be mapped for EVERYONE and the default for everyone must be the same. In Win2k, when you add a printer, it only adds under your profile, even if you add logged in as Admin. Thanks!
-JusTin
 
Write a batch file as follows:

net use lpt1: \\PRN-NOC3\"LaserJet Printer under NOC M&C Console"
net use lpt2: \\prn-noc1\"EPSON Stylus Photo 1280"
net use lpt3: \\PREMPDC\NOC_Shop
net use lpt4: \\PREMPDC\"HP Color LaserJet 4500 PCL 5c"

The quotes may or may not be necessary. I put them in because you have spaces in the names of printers. Also, make sure these are the names under which you shared the printers (not necessarily the names under which they were installed on the host).

I have used this method before, and it has always worked.

 
Hmm... that doesn't work, unless I'm doing something wrong. Do you have any other suggestions on how to do this? Thanks!
-JusTin
 
1st : you have to go to the Server and share the printers you want to add .. let me make an example , you have 3 printers , and their names printer1 , printer2 , and printer3
after sharing these 3 printers ..

go to any client and use the following command :
net use lpt1 \\the IP of the Server\\the name of the printers { printer1 , printer2 or printer3 }

test and ,, Good LUCK !! Mohamed Farid
Know Me No Pain , No Me Know Pain !!!
 
So, is this just mapping the port? Because it does not install the printer. I need the printers to be installed. Thanks!
-JusTin
 
You want what ! :)
what I did is mapping the LPT to the Printers ,,
But To Install them !! Execuse me !! I think this will not be Able !
Mohamed Farid
Know Me No Pain , No Me Know Pain !!!
 
Get the utility CON2PRT.EXE from the W2K resource kit. Create a batch file with the following information:

:INSTALL
CON2PRT /C &quot;\\<server name>\<share name>&quot;
goto END
:END

You could send this batch file to the users in email, or you could put it into the &quot;All Users&quot; startup group. But doing the will install the printers everytime the user logs in. If you have time on your hands, you can build the bat file to check to see if the printers exist and not install if they do. Matt
 
Yes ,, This is a good way ,,
But , Installing the printer from the Server each Time ,, is a very slow specially if all the computers are starting at the morning together ! Mohamed Farid
Know Me No Pain , No Me Know Pain !!!
 
I guess that the quick and dirty way of doing it now that I thought about it for a second is to just put it in the &quot;All Users&quot; desktop. Have them double click the batch file to install the printers for their profile. Once and done per user on the machine.

Matt
 
It will be easy to define the printer at all computers ..
It will be done 1 time ,, I know there is a lot of computers ,, but ,, I think this will be better than installing the printesr everytime !
Mohamed Farid
Know Me No Pain , No Me Know Pain !!!
 
No, you need to define the printer per user since it is a user profile specific. He said he has 4 machines, and 20 users. So if each user rotates through all those machines, there is a possibility of 80 installations x 4 printers, that will take a lot of time.

The bat file that I put up there does not have to be run everytime. Put it in the &quot;All Users&quot; desktop group, and everytime that user logs into the PC, there will be the bat file to establish his/her printer connections on the desktop, once and done. They aren't being installed everytime the user logs in as the desktop group isn't part of the startup group.

There are other ways of doing this like GPO, but I'm assuming that we aren't looking at a conventional network in a small scale setup like this. You could also use roaming profiles, which might be a better option for you overall in this case, but again I don't know your network topology. Matt
 
No , If he install the Printers in the Administartor ,, I think , it will be installed on all the other users .. Mohamed Farid
Know Me No Pain , No Me Know Pain !!!
 
We do something similar in machine deployments, where we use an account called 'build' for image creation. After we have the profile set, we copy that profile to the default user profile.

Logging in simply as the local administrator and installing the printer as a local admin, will only install the printer for the administrator user profile. Like I said before, printers are a profile specific setting.

Unfortunately in our environment we can't preset the printers. We have ~3500 users across the state, in about 100 locations. Our building alone has several hundred printers. Matt
 
Good thread.

v useful.

waahaay for all those resource kit tools!

No Pain No Gain
 
One method we have used in our smaller LANs is to just create a shortcut to the printer UNC name and put it in All Users Starup folder (like \\printserver\printername). The only problem with it is that it says &quot;Before you can use the printer \\printserver\printername, it must be set up on your computer. Do you want Windows to set up the printer and continue this operation? (yes/no)&quot;. So you'd have to instruct your users to say yes to the question for all four printers. Only would have to be done once though.
 
This only works on Windows 2000/XP computers connecting to Windows 2000/XP computers.

Here is a way:

rundll32 printui.dll,PrintUIEntry /ia /c\\server /m &quot;AGFA-AccuSet v52.3&quot; /h &quot;Intel&quot; /v &quot;Windows 2000&quot; /f %windir%\inf\ntprint.inf

rundll32 printui.dll,PrintUIEntry /if /b &quot;Test Printer&quot; /c\\SERVER /f &quot;%windir%\inf\ntprint.inf&quot; /r &quot;lpt1:&quot; /m &quot;AGFA-AccuSet v52.3&quot;


The first line installs the driver, the second line installs the printer.

For more details see:


Daniel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top