Detecting drivers already installed

This forum is for all topics that do not fit into the other ones

Detecting drivers already installed

Postby mtomsak » Mon 26. Sep 2016, 20:01

I am using PcanOemSetup.exe to install the drivers. I am running this setup program from within another installation package. It works fine, but if the drivers are already installed, I get the message "This product is currently installed. Would you like to uninstall it?". My choices are Yes or No.

I was wondering if there exists a command line option to force the selection to No in this case.

If there is not, I need to be able to detect if the product is already installed, so I can check for this as an installation condition within my installer. What exactly does PcanOemSetup.exe check to determine that the product is currently installed?
mtomsak
 
Posts: 1
Joined: Mon 26. Sep 2016, 19:54

Re: Detecting drivers already installed

Postby K.Wagner » Tue 27. Sep 2016, 07:48

Hello,

mtomsak wrote:I was wondering if there exists a command line option to force the selection to No in this case.

This is not possible.

mtomsak wrote:What exactly does PcanOemSetup.exe check to determine that the product is currently installed?

PcanOemSetup.exe is a MSI Installer for the product "PEAK-Drivers". This means, it has a version and an identification number that unequivocally identifies a setup. If you try to install a PcanOemSetup.exe with higher version, then the older one is uninstalled automatically. The multiple installation of the same version of PcanOemSetup.exe is not allowed, that is why you get the prompt.

mtomsak wrote: I need to be able to detect if the product is already installed, so I can check for this as an installation condition within my installer.

Try searching the registry for the product "PEAK-Drivers". The path in where Windows stores installed packages information is:
Code: Select all
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

The values to be taken into account are: DisplayName and DisplayVersion.
Registry.png
Uninstall registry entry of PeakOemSetup.exe
Registry.png (18.16 KiB) Viewed 5724 times

Note that the identification number changes with each release, so you need to check the content of "...\Uninstall" sistematically.
Best regards,
Keneth
K.Wagner
Software Development
Software Development
 
Posts: 394
Joined: Wed 22. Sep 2010, 12:36
Location: Darmstadt, Germany


Return to Miscellaneous