Page 1 of 1

Detect Driver Installed

Posted: Thu Jun 08, 2017 4:21 pm
by glima
Is there a way to detect if the printer driver (V6) has already been installed on the system. I don't want to run the install again and have the customer need to reboot when they install re-install our application. We use the PDFX6SA_sm.exe to install the printer.

PDFX6SA_sm.exe /VERYSILENT /NORESTART /COMPONENTS="pdfSaver,PDF-XChange driver" /AutoUnload:3 /PNAME="Bates PDF Printer 2017" /DRVwoPRN"

Re: Detect Driver Installed

Posted: Thu Jun 08, 2017 10:33 pm
by Roman - Tracker Supp
Hello,

Probably the most portable way (across al supported WIndows versions) to this would be to use WMIC - this is a command line utility to access the system configuration through WMI interface.
This is a sample batch file that detects if any printer with a given driver name is installed:

Code: Select all

wmic printer where "DriverName='PDF-XChange 6.0'" get Name
if errorlevel 1 echo No printers found based on the specified driver
Or you can redirect the WMIC output to a file or to another utility for further parsing:

Code: Select all

wmic /output:wmi_output.txt printer where "DriverName='PDF-XChange 6.0'" get Name /value