jskfan
asked on
Print Drivers Install with Script
Print Drivers Install with Script
I have used the windows default printer scripts to add printer to remote computer, it works fine. However it does not seem like it installs the specified driver properl.
when I check printer properties it throw a communication error, but still open printer properties, everything seems to be configured as it is supposed to. However when I click to print test page it just freezes.
I would like to know if anything missing and needed to be added in addition to these scripts:
prnmngr.vbs and prnport.vbs
Probably I need to select "Replace the driver" via script
Thank you
I have used the windows default printer scripts to add printer to remote computer, it works fine. However it does not seem like it installs the specified driver properl.
when I check printer properties it throw a communication error, but still open printer properties, everything seems to be configured as it is supposed to. However when I click to print test page it just freezes.
I would like to know if anything missing and needed to be added in addition to these scripts:
prnmngr.vbs and prnport.vbs
Probably I need to select "Replace the driver" via script
Thank you
ASKER
I am getting this error after i run the script and install the printer and check printer properties
I believe the script should specify the option "Replace the current driver " instead of "use the driver that is currently installed "
I believe the script should specify the option "Replace the current driver " instead of "use the driver that is currently installed "
for /f %%a in (C:\Scripts\CalledScripts\CompOnly.CSV) do (
@echo Creating Printer Port on %%a
cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\prnport.vbs" -a -s %%a -r "Printerhostname" -h hostname -o raw -n 9100
@echo Installing Print Drivers on %%a
cscript.exe C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs -a -r "Printerhostname" -m "HP Universal Printing PCL 6" -s %%a
@echo Setting Printer on %%a
cscript.exe C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -a -p "Printer Queue Name" -m "HP Universal Printing PCL 6" -r "Printerhostname" -s %%a
REM Not really needed, because the script will continue with the next machine
)
ASKER
Can I try a different script to see if it will work ?
Thank you
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Even if you change it the way you suggested the printer does get install properly:
found this link:
https://msfn.org/board/topic/26296-installing-network-printers-silently-heres-how/
however the author did not explain clearly how to deploy the registry file with the script.
@echo Creating Printer Port on %%a
cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\prnport.vbs" -a -s %%a -r "Printerhostname" -h hostname -o raw -n 9100
\cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\Prndrvr.vbs" -a -m "HP Universal Printing PCL 6" -h "sccm\hp drivers\hpcu230u.inf" -s %%a
@echo Setting Printer on %%a
cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -d -a -p "Printer Queue Name" -m "HP Universal Printing PCL 6" -r "Printerhostname" -s %%a
REM Not really needed, because the script will continue with the next machine
found this link:
https://msfn.org/board/topic/26296-installing-network-printers-silently-heres-how/
however the author did not explain clearly how to deploy the registry file with the script.
ASKER
Will et back to this topic sometime
Please provide the script you're using.