How to detect SQL Server Express in WiX installer

前端 未结 3 1916
野性不改
野性不改 2020-12-15 00:04

How do I detect if Sql Server Express is installed and running on a machine in a WiX installer?

I want to check before installing my application and if it\'s not ins

3条回答
  •  情深已故
    2020-12-15 00:21

    I tried Krzysztof's solution (above) - but on some machines when using this approach it wasn't correctly detecting when they did not have Sql Express installed.

    It looked to be caused by mishandling of the REG_MULTI_SZ InstalledInstances registry value?

    As I was checking to see if I needed to stop/restart the Sql Server Express service in the installer, I decided to just check against that instead - so here's my alternative, where I just check for the service instead:

    
      
          
    
    SQLEXPRESSINSTALLED
    
    NOT SQLEXPRESSINSTALLED
    

    Bit of a hack, but seems to work well enough for our customers (were using the conditions within components, rather then the example Launch conditions shown above)

提交回复
热议问题