Link to home
Start Free TrialLog in
Avatar of tblinc
tblinc

asked on

Batch file to map printers

Im trying to find a way to map multiple printers everytime someone logon on their computer and actually, I don't want to use a vbscript it has to be a .bat file... I got 3 printers, 10.0.0.230, 231 et 130. Anybody could help me ?

Thanks.
Avatar of Brian Pierce
Brian Pierce
Flag of United Kingdom of Great Britain and Northern Ireland image

net use \\server\printer1
net use \\server\printer2
etc...
ASKER CERTIFIED SOLUTION
Avatar of BigBadWolf_000
BigBadWolf_000
Flag of United States of America image

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
KCTS's script will create the printer, but it will only work if the TCP/IP port already exists. To create the port in a script, use "cscript prnport.vbs". For details see:

http://technet.microsoft.com/en-us/library/bb490975.aspx
Avatar of Jon DeVito
Jon DeVito

Or adding this to a logon bat script will work:

cscript %systemroot%\system32\prnmngr.vbs -ac -p "\\SERVERNAME\SHARENAME"

I use this one on my network & it works pretty well.

Jon
Avatar of tblinc

ASKER

Thanks.