3

I'm completely new to Windows Installer, so please be gentle!

I want some drivers to be installed when my customers installs my program. If the drivers already is installed, however, I want the installation program to skip that certain step and continue with installing my program.

I have tried adding a Windows Installer launch condition, which searches for a certain component Id. When I'm trying to install, though, the error message shows up and the installation program exits - nothing is installed. It doesn't matter if the driver is installed or not - I get the same result.

Any clues?

Thanks in advance!

Göran Lilja
  • 625
  • 2
  • 5
  • 17

1 Answers1

1

A launch condition stops the installation if the condition is not met. This is not a solution for what you need.

You can try detecting if the driver is installed by using a search: http://msdn.microsoft.com/en-us/library/aa367579(VS.85).aspx

You can also use an immediate custom action which performs this search and sets an installer property based on the search result. This custom action requires custom code written by you. It can be a Win32 DLL:

http://msdn.microsoft.com/en-us/library/aa368338(VS.85).aspx

http://msdn.microsoft.com/en-us/library/aa367457(VS.85).aspx

http://www.advancedinstaller.com/user-guide/serial-number-validation-dll.html (a sample C++ DLL)

or a VBScript: http://msdn.microsoft.com/en-us/library/sx7b3k7y(VS.85).aspx

This way you can use the custom property to condition your custom action. For example, if the property is empty, the driver needs to be installed. So your custom action can use the condition:

NOT MY_CUSTOM_PROPERTY

where "MY_CUSTOM_PROPERTY" is the property you set based on a search.

Cosmin
  • 21,216
  • 5
  • 45
  • 60
  • Hi! I don't understand. How do I create a custom action that performs the search? I've tried to create a launch condition that searches for the component Id, but it doesn't seem to care if the component is found or not, it cancels the installation either way... I don't even have to use it as a condition on my custom actions. – Göran Lilja Feb 22 '11 at 16:01