REMARK --- Start of Script ---
REMARK Added a script title so I know what printer I'm installing
echo *** Installing Canon iPF720 Plotter ***
REMARK Remove old printer presence via PowerShell registry search
PowerShell "if (test-path 'hklm:\software\microsoft\windows NT\currentversion\Print\Printers\HP DesignJet 1050C Plotter'){cscript c:\windows\system32\printing_admin_scripts\en-us\prnmngr.vbs -d -p 'HP DesignJet 1050C Plotter'}"
REMARK AMD64 works with all typical Windows useable 64-bit processors
if %processor_architecture% equ AMD64 (cscript c:\windows\system32\printing_admin_scripts\en-us\prndrvr.vbs -a -m "Canon iPF720" -h "\\server\share\Printers\Drivers\Canon iPF720\64-bit\Driver" -i "\\server\share\Printers\Drivers\Canon iPF720\64-bit\Driver\6WJF02M.INF") else (cscript c:\windows\system32\printing_admin_scripts\en-us\prndrvr.vbs -a -m "Canon iPF720" -h "\\server\share\printers\Drivers\Canon iPF720\Driver" -i "\\server\share\printers\Drivers\Canon iPF720\Driver\2WJF02M.INF")
REMARK Adding the IP port the new printer will use
cscript c:\windows\system32\printing_admin_scripts\en-us\prnport.vbs -a -r "CanoniPF720" -h 192.168.1.100 -o raw -n 9100
REMARK Putting the Friendly name, driver, and port together
cscript c:\windows\system32\printing_admin_scripts\en-us\prnmngr.vbs -a -p "Canon iPF720 Plotter" -m "Canon iPF720" -r "CanoniPF720"
REMARK Added a 10 second pause so I can chain install scripts together yet still monitor each installation progress
timeout /t 10
REMARK --- End of Script ---
I also thought about adding an audible prompt when things go right or wrong. This would lessen the need to physically watch the install but rather allow multitasking by listening out for the correct sounds after each install while performing other duties.
No comments:
Post a Comment