1.

Solve : install a TCP IP printer via batch file using cscript?

Answer»

I am trying to figure out how to install this printer via tcp ip. I looks like the .inf file is the trouble. I know nobody outside my environment can run this CODE but if you have had this error and solved it, What did you do? I have been working on this script for a few days now.
Code: [Select]cls
@echo Copying Drivers to your Computer
@echo This will take a moment
@echo ************************************
MKDIR %temp%\deploy
@echo.
xcopy /Y "\\bh-miworks-srv2\PrintDrivers\Printing_Admin_Scripts\en-US" "%temp%\deploy"
xcopy /Y "\\bh-miworks-srv2\PrintDrivers\Drivers\Ricoh MP6501\Win 10\oemsetup.inf" "%temp%\deploy"
@echo.
echo Done Copying Files




cls
@echo #######################################################################
@echo # #
@echo # *Kinexus* #
@echo # #
@echo # This will Install Ricoh color Dockside printer on your computer. #
@echo # Once you click OK, it will run. It MAY take a minute to install. #
@echo # During that time you will see no screen activity until it finishes. #
@echo # Installing Printer.... please wait #
@echo.# #
@echo #######################################################################
@echo.
cscript "%temp%\deploy\Prndrvr.vbs" -a -m "RICOH Aficio MP C6501 PCL 6" -v 2 -e "Windows NT" -if "%CD%""%temp%\deploy\oemsetup.inf" -h "%CD%""%temp%\deploy
cscript "%temp%\deploy\prnport.vbs" -a -r IP_192.168.141.20 -h 192.168.141.20 -o raw -n 9100
cscript "%temp%\deploy\Prnmngr.vbs" -ac -p "BH Dockside Color" -m "RICOH Aficio MP C6501 PCL 6" -r "IP_192.168.141.20"
@echo.
@echo.
@echo =====================================================================
@echo = =
@echo = *Kinexus* =
@ECHO = Installation of the Ricoh printer has completed! =
@echo = If you have any problems, please contact IT. =
@echo = =
@echo =====================================================================
pause
exit
After running the script I get the following error having to due with the .inf



If someone has had this error and knows how to fix it, I would appreciate any suggestions

ThanksThe script show an -if option but the screen SHOWS an -i option for the driver file. Also the driver file on the screen looks crazy. Are you showing the code for the same script?
The guy has a two page thread here: http://www.dostips.com/forum/viewtopic.php?f=3&t=7094My only question would be why is he attempting to do it this way ? ?Do you MEAN with the large number of repeating lines, or the task itself?

I reduced it to a small script some time BACK, but my code was too complex to follow as the guy is starting out in scripting.
So I didn't post it.



Discussion

No Comment Found