Link to home
Start Free TrialLog in
Avatar of garethcummings
garethcummings

asked on

Logon script

Hi

I have created a simple batch file so when the user logs on the network drives get mapped on there machine, however I also want the network printer to be installed on the users machine when they logon as well.  I have seen the command net use lpt1: //servername/sharename, however this will not work in my batch file as the printer is on a ip address.  Anyone have any ideas?

Thanks
Gareth
Avatar of oBdA
oBdA

Install the printer on a server and share it. Then use con2prt.exe (from the NT Zero Administration Kit, still working fine in W2k/XP) to map the printer in the logon script.

Zero Administration Kit
http://www.microsoft.com/ntworkstation/downloads/Recommended/Featured/NTZAK.asp

To map a network printer:
con2prt.exe /c \\PrintServer\PrintShare
("/cd \\printserver\share" to install it as default printer; /f to delete all existing connections)

How to Use Con2prt.exe to Connect to a Network Printer
http://support.microsoft.com/?kbid=181663
if it is a static IP address cannot you just swap the \\servername for \\ipaddress (obviously enter the ip eg: 10.34.8.80)
sorry ignore my comment
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
Are you running Active Directory? Can't you do this with a policy?
Use kixtart scripts.  They are a little scary at first, but theu work sweet
http://www.kixtart.org/

You can download it for free
Avatar of garethcummings

ASKER

Thanks biggy_b, that worked fine for me.