Jump to content

many network printers in many offices - what I did


Recommended Posts

I know that this topic has been discussed before, but I wanted to show the method I used. This would be useful for any large office (or better yet, multiple offices) with lots of network printers, and each person would only connect to a few of them, so it wouldn't work putting the printer installation right in your script.

Let's say you have 2 offices with multiple printers each. Here's what I'd do:

1. In the $$ folder, create a folder called "Printers".

2. In there, create a sub-folder for each office, such as "Main" and "Branch".

3. In every office sub-folder, put a copy of netprint.vbs:

Set NetObj = CreateObject("WScript.Network")
PRINTER = WScript.Arguments(0)
NetObj.AddWindowsPrinterConnection PRINTER

4. In each office sub-folder, create a batch file for each printer in that office based on its name, like "PTR1.BAT", "COLOR1.BAT", and so on.

5. The code in the batch file PTR1.BAT would look like this, with only the printer name and server name changed as needed; then do the same with each printer in each office:

@echo off

Echo Installing Printer...

WSCRIPT.EXE netprint.VBS \\server\PTR1

:end

6. Create a shortcut for each batch file and let it reside in the same location as its source file. Make sure the target path of the shortcut matches the path to the batch file, such as "C:\WINNT\Printers\MAIN\PTR1.BAT"

7. Optional -- go to the properties of each shortcut and change the icon to something resembling a printer.

8. Put the following two lines in your final cleanup batch file:

mkdir "C:\Documents and Settings\All Users\Start Menu\Programs\Accessories\Printers"
xcopy C:\WINNT\Printers\*.lnk "C:\Documents and Settings\All Users\Start Menu\Programs\Accessories\Printers" /e /i

The end result is this -- when any user logs on, they go to Start > Programs > Accessories > Printers, browse to the sub-folder of their particular office, and click on the shortcut for any printer listed. Barring any heavy network traffic, the batch file runs for about 5-10 seconds and installs the printer.

Of course, if you install to "WINDOWS", then adjust everything accordingly.

Important note -- during the initial $OEM$ copy, everything will probably be truncated to 8 characters, so you'll probably have to put some entries in your $$Rename.txt file, like so:

[\WINNT\PRINTERS\MAIN]
COLORP~1.LNK="Color Printer 1.LNK"
COLORP~1.BAT="Color Printer 1.BAT"
COPIER~1.LNK="Copier Printer.LNK"
COPIER~1.BAT="Copier Printer.BAT"

I know this seems like a lot of work, but in the long run it'll save you a lot of time, especially in your field offices. :D

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...