您好,登錄后才能下訂單哦!
在http://windyma.blog.51cto.com/661702/1967027文章,已做好用戶腳本基礎(chǔ)上
在腳本文件kixtart.kix里添加如下內(nèi)容:
IF INGROUP ("Color_Printer") If AddPrinterConnection ("\\zsprinter.nccn.int\NEO-Color-Printer") = 0 ? "Added NEO-Color-Printer connection...." Endif Endif ;添加NEO-Mono-Printer打印機(jī)的同時(shí)設(shè)置為默認(rèn)打印機(jī) If AddPrinterConnection ("\\zsprinter.nccn.int\NEO-Mono-Printer") = 0 ? "Added NEO-Mono-Printer connection...." If SetDefaultPrinter ("\\zsprinter.nccn.int\NEO-Mono-Printer") = 0 ? "Set default printer to NEO-Mono-Printer...." Endif Endif ;為不同打印機(jī)用戶添加另外一臺(tái)打印機(jī)的同時(shí)設(shè)置為默認(rèn)打印機(jī) IF INGROUP ("Small_Printer") If AddPrinterConnection ("\\zsprinter.nccn.int\Small-Printer") = 0 ? "Added printer to Small-Printer...." If SetDefaultPrinter ("\\zsprinter.nccn.int\Small-Printer") = 0 ? "Set default printer to Small-Printer...." Endif Endif Endif
到此針對(duì) kix添加打印機(jī)的腳本已經(jīng)完成,但還會(huì)有一個(gè)問(wèn)題就是,當(dāng)windows系統(tǒng)從未安裝過(guò)上面打印機(jī)驅(qū)動(dòng)時(shí),一般AD用戶是無(wú)權(quán)限安裝的,windows7電腦會(huì)彈一個(gè)框出來(lái)要求輸入有權(quán)限的用戶名和密碼進(jìn)行安裝,但XP的電腦則直安裝不成功。
所以我們得事先幫讓計(jì)算機(jī)自動(dòng)安裝驅(qū)動(dòng),我們?cè)谟蜥槍?duì)計(jì)算機(jī)對(duì)像添加一個(gè)組策略,組策略的計(jì)算機(jī)配置---策略---windows設(shè)置----腳本(啟動(dòng)/關(guān)機(jī))---啟動(dòng)項(xiàng) 添加一個(gè)printerdriver.cmd文件,內(nèi)容如下(根據(jù)不同系統(tǒng)32位或64位添加不同驅(qū)動(dòng)):
@echo off goto %PROCESSOR_ARCHITECTURE% :x86 IF NOT EXIST "C:\Windows\system32\spool\DRIVERS\W32X86\3\KOAYQJAT.dll" (rundll32 printui.dll,PrintUIEntry /ia /m "Generic 36C-6SeriesPCL" /f \\zsprinter.nccn.int\Driver\ADC286_Printer\Win_x86\KOAYQJA_.INF /u) IF NOT EXIST "C:\Windows\System32\spool\drivers\W32X86\3\KOAYXJAG.DLL" (rundll32 printui.dll,PrintUIEntry /ia /m "Generic 42BW-4SeriesPCL" /f \\zsprinter.nccn.int\Driver\AD289_Printer\Win_x86\KOAYXJA_.INF /u) IF NOT EXIST "C:\Windows\system32\spool\DRIVERS\W32X86\3\GWP.DLL" (rundll32 printui.dll,PrintUIEntry /ia /m "Generic 21BW-3 PCL" /f \\zsprinter.nccn.int\Driver\AD219_Printer\32\GWP.inf /u) goto end :AMD64 IF NOT EXIST "C:\Windows\system32\spool\DRIVERS\x64\3\KOAYQJAT.dll" (rundll32 printui.dll,PrintUIEntry /ia /m "Generic 36C-6SeriesPCL" /f \\zsprinter.nccn.int\Driver\ADC286_Printer\Win_x64\KOAYQJA_.INF /u) IF NOT EXIST "C:\Windows\system32\spool\DRIVERS\x64\3\KOAYXJAG.DLL" (rundll32 printui.dll,PrintUIEntry /ia /m "Generic 42BW-4SeriesPCL" /f \\zsprinter.nccn.int\Driver\AD289_Printer\Win_x64\KOAYXJA_.INF /u) IF NOT EXIST "C:\Windows\System32\spool\drivers\x64\3\GWP.DLL" (rundll32 printui.dll,PrintUIEntry /ia /m "Generic 21BW-3 PCL" /f \\zsprinter.nccn.int\Driver\AD219_Printer\64\GWP.inf /u) :end exit
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。