Link to home
Start Free TrialLog in
Avatar of dboyle53169
dboyle53169

asked on

Setup automatic printer install

Is there a way in Windows 2000, Windows XP, or Windows 2003 to have printers automatically install when the user logs on? Similar to the way Netware works.

Thanks
Avatar of Pete Long
Pete Long
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi dboyle53169,
Yes do it from login script or a batch file launched from login script

Running Batch files at Startup/Shutdown (Windows 2000)



You can run a batch file at either Startup or shutdown (or Logon/Logoff) from the Local Security Policy

CLick Start >Run > type "gpedit.msc" {enter}

Navigate to the following location


Local Computer Policy >Computer Configuration >Windows Settings >Scripts

OR

Local Computer Policy >User Configuration >Windows Settings >Scripts

In both locations you will see a set of scripts in the USER settings you set scripts for LOGON and LOGOFF. In the COMPUTER settings you will see scripts for STARTUP and SHUTDOWN


Add your .bat file to the appropriate script.

PeteL
dboyle53169,
Mapping Drives and Printers From Command

*****Drives*****

These command can be executed from either command line, Batch File OR Login Scripts

This command maps a drive "Z:\" to a shared directory on a server called "Server1"

net use z: \\server1\sharename\

If you need permissions to use this network resource toy can also enter the username and password. (See Security Below)

net use z: \\server1\sharename\ /user:username password

The above commands will work untill a user loggs out or the machine is rebooted, to make the mapping permanent you need to use a "Persistent switch"

net use z: \\server1\sharename\ /user:username password /Y

*****Printers*****

The Syntax is the same but this time you are mapping an "lpt" port (Line Printer Terminal) All the rules above apply so the full command is,

net use lpt1 \\machinename\sharename\ /user:username password /Y

*****Security*****

If you do need to use  username and password, this has obvious security implications, Consider using NSIS
http://nsis.sourceforge.net/site/Download.6.0.html

For instructions on its use see https://www.experts-exchange.com/questions/20710867/Mapping-a-Network-Drive-through-a-Script.html
PeteL
Avatar of coopey247
coopey247

You can even add multiple network printers in a script without using LPT ports.  Run this command with a /? to get the list of command line switches:

rundll32.exe printui.dll,PrintUIEntry

This command is case-sensitive.   I've successfully used it to install some printers, but others just won't work, so it's hit and miss.
You can use Con2Prt as well which is really good.

http://www.ss64.com/nt/con2prt.html

or

Adprintx

http://www.jsiinc.com/SUBM/tip6000/rh6065.htm
ASKER CERTIFIED SOLUTION
Avatar of biggy_b
biggy_b

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
Sheesh difficult one to call lots of good answers :-?

Pete
For 50 points I don't mind what happens :-)