Discussion Locked

Windows Scripting

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I would like to write a batch file that will check to see that a computer is in a particular lab and if this condition is true, map that computer to another computer that has a locally installed printer. Unfortunately we do not have a printer with aNIC available for this lab so each user has had to install the printer by going through Network Neighborhood. I created a script that will check the computer?s name to identify its location, but I don?t know how to map to the printer. Any suggestions?

5 replies

by beermonster

You'd be better advised to use a windows scripting host script for this. The 2000 reskit comes with sample scripts for just this purpose, check out portmgr.vbs which creates network ports and prncfg.vbs which configures printers. I've know these to be used on NT 4 boxes too. Hope this helps.

by ð

What scripting program are u using? If you doing a plain batch file, use the "net use" command to map the printer.

example: net use lpt1: \\computername\printershare

This discussion is closed to new replies.