I have several apps which need to set the same DWORD registry flag. The apps can be installed together (independently) on the same machine, so the flag must not be unset if one app is uninstalled while another is in place. Unfortunately the only permissible values for the flag are zero (or unset) and one.
I coded a C dll to be called from two custom actions to manage a "reference count" (in the registry, separate from the flag). When an app is installed one CA increments the refcount, and when uninstalled the other CA decrements the refcount. When the refcount is zero, the flag is cleared. This code will be in a merge module, to be included in all relevant apps. But I'm having a problem conditioning the CAs so this actually works. I'm using the component states of a binary file thus for install: $C_bin = 3 (i.e. action state = local) and for uninstall $C_bin = 2 AND ?C_bin = 3 (action state = absent & installed state = present) That works for simple install & uninstall, but upgrade and repair are problems. - unless the binary component version is different in the upgrading package, only the increment CA executes. - during repair the CA executes, but I don't want it to Are there conditions which would work? Or is there some other approach which would be reliable? A sudden thought ... perhaps the cleanest solution would be simply to have a merge module that sets the flag, as a normal 'Registry' component , and use that in all appropriate apps. Then Windows Installer will automagically manage the reference count. Can anyone see flaws in that idea? (I'll experiment tomorrow.) Thanks for any suggestions Alan ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users