[wix-users] Burn (3.11) main product that automatically uninstalls plugins/extensions

Jack Johnson nick1782 at outlook.com
Tue Feb 6 19:24:11 PST 2018


I have developed a Burn installer that installs my main program.  I have also developed a plugin, which, when being installed will write its product code to the registry.  The end user may or may not install the plugin.  My goal is that, when a user uninstalls the main program, the plugin gets uninstalled too.  (Otherwise, strange things happen...)  What I'm trying to do is this:

    util:RegistrySearch Root='HKLM' Key='Software\ACME\AWESOMEAPP\$(var.ProductVersionInternal)' Value='UNINSTALLPLUGIN1' Win64='no' Variable='UninstallPlugin1ProductCode'
    util:ProductSearch Variable="Plugin1Installed" ProductCode="[UninstallPlugin1ProductCode]" Result="state"

and then, in the Chain, before the main program msi:

      ExePackage PerMachine="yes" InstallCondition="false" Name="1.txt" DetectCondition="Plugin1Installed>=3"
                  UninstallCommand="[SystemFolder]MSIExec.exe /X [UninstallPlugin1ProductCode] /qn"
        ExitCode Value="0" Behavior="success"
      ExePackage


But, I get an error:
error CNDL0009 : The util:ProductSearch/@ProductCode attribute's value, '[UninstallPlugin1ProductCode]', is not a legal guid value.

So, I'm at a loss.  I'm not even sure if the DetectCondition would work.  how would I accomplish my goal?


More information about the wix-users mailing list