使用vbs脚本安装打印机

时间:2015-08-11 10:03:54

标签: windows printing vbscript

有人可以为基督的缘故帮助我,我想让这个剧本有效。我总是收到一条消息错误,请参阅错误图片"。我在CMD提示符(驱动程序安装)中测试了cscript字符串,它没有问题。我正在使用VBsEdit。检查每一行几个小时,但也许我是盲目的:-),我将永远感激!感谢

pic

CLS
@ECHO off

SET varIP=10.5.10.15
SET varDriver=4505ci KX
SET varDriverFolder=\\Prox-data2\Reception\IT\Hardware\Printer\Drivers\Triumph Adler\Win8.1-64bit\TA4505ci\KxDriver_cCD_cLP_20150212\
SET varDriverFile=\\Prox-data2\Reception\IT\Hardware\Printer\Drivers\Triumph Adler\Win8.1-64bit\TA4505ci\KxDriver_cCD_cLP_20150212\OEMSETUP.inf
SET varName=TA238
SET varLocation=TA238

Rem "Deleting TCP/IP port"
Rem CSCRIPT /nologo %windir%\system32\prnport.vbs -d -r IP_10.5.10.15

Rem "Creating TCP/IP port"
CSCRIPT /nologo %windir%\system32\prnport.vbs -a -r IP_10.5.10.15 -o raw -n 9100 -h 10.5.10.15

CLS
Rem "Installation message"
@ECHO.
@ECHO The BE9A-X9302-PR238 printer is currently being installed.
@ECHO.
@ECHO Please do not close this window.
@ECHO.
@ECHO Once the installation is complete this Setup window will exit.
@ECHO.

Rem "Driver installation"
CSCRIPT c:\windows\system32\Printing_Admin_Scripts\en-US\prndrvr.vbs -a -m "4505ci KX" -h "\\Prox-data2\Reception\IT\Hardware\Printer\Drivers\Triumph Adler\Win8.1-64bit\TA4505ci\KxDriver_cCD_cLP_20150212" -i "\\Prox-data2\Reception\IT\Hardware\Printer\Drivers\Triumph Adler\Win8.1-64bit\TA4505ci\KxDriver_cCD_cLP_20150212\OEMSETUP.inf"  
CLS

Rem "Printer installation"
@ECHO.
@ECHO Completing installation.
CSCRIPT /nologo %windir%\system32\Printing_Admin_Scripts\en-US\prnmngr.vbs -a -p "TA238" -m "4505ci KX" -r "IP_10.5.10.15"
CLS

Rem "Location configuration"
@ECHO.
@ECHO Completing installation.
CSCRIPT /nologo %windir%\system32\prncnfg.vbs -t -p "TA238" -l "TA238"
CLS

Rem "Making it Default printer"
Rem CSCRIPT %windir%\system32\prnmngr.vbs -p "" -t

0 个答案:

没有答案