日期:2014-05-17  浏览次数:20840 次

WINDOWS: 根据分组的本地TCP/IP打印机的安装

WINDOWS: 根据分组的本地TCP/IP打印机的安装
2010年12月13日
  @font-face { font-family: "MS 明朝"; }@font-face { font-family: "MS ゴシック"; }@font-face { font-family: "MS ゴシック"; }@font-face { font-family: "Calibri"; }@font-face { font-family: "Cambria"; }p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: Cambria; }p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle { margin: 0cm 0cm 0.0001pt; font-size: 12pt; font-family: Calibri; color: rgb(79, 129, 189); letter-spacing: 0.75pt; font-style: italic; }p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph { margin: 0cm 0cm 0.0001pt 36pt; font-size: 12pt; font-family: Cambria; }p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst { margin: 0cm 0cm 0.0001pt 36pt; font-size: 12pt; font-family: Cambria; }p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle { margin: 0cm 0cm 0.0001pt 36pt; font-size: 12pt; font-family: Cambria; }p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast { margin: 0cm 0cm 0.0001pt 36pt; font-size: 12pt; font-family: Cambria; }span.SubtitleChar { font-family: Calibri; color: rgb(79, 129, 189); letter-spacing: 0.75pt; font-style: italic; }.MsoChpDefault { font-family: Cambria; }div.WordSection1 { page: WordSection1; }ol { margin-bottom: 0cm; }ul { margin-bottom: 0cm; }  按:这个脚本是本人写的基于我现在工作的系统网络环境所做的,主要用意是:在一个非Windows服务器管理的网络环境中,提供一种方便的工具,来安装本地的TCP/IP打印机,以方便管理员对打印机的管理。他可以根据计算机的分组信息(分组可以是根据办公室位置来区分,因为打印机都是于位置和权限有关的)以及权限,来安装打印机,这样不同的人员在本台电脑上登录,可以存取到最近的可以打印的打印机,而不是远在其它地方的打印机。
  下面是我编写的英文版本的使用说明初稿,还没有在我公司内部发布,先放在我的blog里面。等我有时间再来翻译过来。
  Name: SetupIPPrinter (set up Local TCP/IP printer)
  Created: May 14, 2010
  Updated: Dec 12, 2010
  Description: 
  This program set up TCP/IP printer on a local PC for all users who logged in.
  It is used on the following 3 situation but not limited:
  School has no server.
  School has a Mac server.
  School has a PC server, but some AD user groups have to use local TCP/IP printer.
  Introduction: In a PC server school, student printing is managed on server and teachers can put network printer connection easily too. In a none-PC server school, school tech may have to set up TCP/IP printer on each PC for teachers and/or students manually for now. Doing this manual setup is a time consuming task, especially for a number of computers. The purpose of this program is to fill the gap to provide a simple and easy way for school tech to set up printer on PCs. On a PC server, we manage menus$ share and put a printer list file in "location" folders which is defined in computers' Location field on AD. This program does the similar way and provides more options. Printer Configuration: Setup a local printer is different from a network printer connection, it asks for model, driver, TCP/IP port, and others. So we must define each printer configuration first. All printer configuration information is stored in a file called PrinterConfig.ini  file.  Note : if you put /c option in command line, this file name will be changed, for example, /c 212, the file name will be 212_PrinterConfig.ini Define a Printer Configuration file: This file is a standard DOS text file. Each line defines one and only one printer. Each line has the following format: Permission, PrinterName, IP, DriverInfFile, PrinterModel, Location, Comment A comma separates each field. The maximum number of printers is 500.  Lines starting with # are comments. Spaces before and behind each field will be ignored. Specification of each field: Permission : either A or S 1.      A = All users can print 2.      S = Staff only can print PrinterName : The printer name shows in the Printers and Faxes list in XP. IP : A valid IP address or the Printer name which is defin