Note that there are some explanatory texts on larger screens.

plurals
  1. POMSI installer Update with Com interop
    text
    copied!<p>I've created an installer (the basic windows installer type) some weeks ago (version 1.0.0) which deploys some dll's and also registers one of them for com-interop (with vdsrpCOM). Not a big deal actually. I also have an helper-class which does some things onBeforeInstall and onAfterInstall via custom actions (Extracting a ZIP-library in a specific location).</p> <p>Now it's time to update my product, and more specific my com-registered dll. So, i changed the file and assembly version of all dll's that have to upgrade and mark the installer RemovePreviousVersions = true. Ofcourse, beside updating the file and assembly versions of my projects, i also update the version of my installer (to 1.1.1).</p> <p>When Installing this new version, every dll that has a new file version gets nicely overwritten, and those that haven't got a changed fileversion aren't (ofcourse, MSI is that smart that 'If the thing isn't changed, why should I replace it then?'...)</p> <p>The only error I encounter now is that my com-registered dll isn't registered very well anymore. I also notice that in ole-view, my dll is still registered but is missing some lines of code in the 'Registery section', more specific: MyNamespace.MyClass = MyNamespace.MyClass CLSID = {bla-bla-bla-bla-bla}</p> <p>Uninstalling and reïnstalling solves the issue. But ofcourse, I don't want to unistall and reïnstall because that is what the MSI is supposed to take care for.</p> <p>So, I've been thinking, as I do have an installerHelper which gets triggered on onBeforeInstall by a custom action, why don't I just check myself if there is a version installed and if so, remove it.</p> <p>Now, the only constant between versions in the UpgradeCode. And there is where my question starts: How can I get the upgrade code from withing my helper class, check for previous versions that have the same upgrade code, UnInstall those ones in the onBeforeInstall method?</p> <p>Or, maybe better, how could I ensure that com-registering is handled well on an update? (thats maybe even easier, but I sure like the Idea to be able to force a complete unistall/reinstall)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload