Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Script to install printer, help!

$
0
0

My company does not use Active Directory. We just put a new printer in, and I want to install the printer by deploying a script through Novell. I have the script pretty much all ready to go, except it has one problem... it makes the printer default on my machine every time I run it. I was wondering if someone could take a look at it and see what I need to do to remove the action of making the printer default.

Here is the script:

CLS
@ECHO off
SET varIP=172.16.20.7
SET varDriver=Xerox WorkCentre 7535 PS
SET varDriverFolder=C:\Xerox\WC7545-7556_PS_x64_Driver.inf
SET varDriverFile=C:\Xerox\WC7545-7556_PS_x64_Driver.inf\x2DNORP.inf
SET varName=Mailroom Xerox 7535
SET varLocation=Mailroom
REM "Deleting TCP/IP port"
CSCRIPT /nologo %windir%\system32\Printing_Admin_Scripts\en-US\prnport.vbs -d -r IP_%varIP%
REM "Creating TCP/IP port"
CSCRIPT /nologo %windir%\system32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r IP_%varIP% -o raw -n 9100 -h %varIP%
CLS
REM "Installation message"
@ECHO.
@ECHO The %varLocation% 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 /nologo %windir%\system32\Printing_Admin_Scripts\en-US\prndrvr.vbs -a -m "%varDriver%" -h "%varDriverFolder%" -i "%varDriverFile%"  
CLS
REM "Printer deletion"
@ECHO.
@ECHO Completing installation.
CSCRIPT /nologo %windir%\system32\Printing_Admin_Scripts\en-US\prnmngr.vbs -d -p "%varName%"
CLS
REM "Printer installation"
@ECHO.
@ECHO Completing installation.
CSCRIPT /nologo %windir%\system32\Printing_Admin_Scripts\en-US\prnmngr.vbs -a -p "%varName%" -m "%varDriver%" -r "IP_%varIP%"
CLS
REM "Location configuration"
@ECHO.
@ECHO Completing installation.
CSCRIPT /nologo %windir%\system32\Printing_Admin_Scripts\en-US\prncnfg.vbs -p "%varName%" -l "%varLocation%"
CLS

This is a Windows 7 Pro environment.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>