Hi there,
I'm converting my installer to an MSI-based installer having used Inno Setup for years until now. It's all gone really well with one exception, which is causing me a headache!
The requirement I need to try and fulfil is to check whether there's an earlier version of the software installed, but that earlier version of the software would have been installed using the old installer created with Inno Setup. I thought a custom action would be the way to go and wrote a method in an Installer class (VB.NET) to detect if the software was installed and run the uninstaller (unins000.exe) to remove it if so.
My intention was to have this method run before any of the files contained in the MSI were copied to the Program folder. For various reasons, I need to use the same install folder as Inno Setup was using (C:\Program Files\MyApp).
What I've tried so far:
- Overriding the Install() method in the Installer class and executing my method to remove the Inno Setup version before calling MyBase.Install(). Unfortunately, the MSI files have copied by this point so running the Inno Setup uninstaller removes the files put there by the MSI and it completely breaks everything;
- Using a WIX custom action.. I followed the guidance available (http://www.advancedinstaller.com/user-g ... rp-ca.html) but I couldn't get anywhere. Even doing an empty, barebones custom action like the one in the example resulted in the installer ending "prematurely" (the word used on the final MSI screen) without any kind of detail in the Event Log of what went wrong. Does it matter that I used VB as opposed to C Sharp in the example? Can't imagine so..
I suspect a WIX-based custom action is still the way to go, but need some help getting even the most basic one to work. I'm also unsure which standard action to add my custom action to. I need to run it before the files are copied and it needs to not impersonate the user (i.e. needs to be SYSTEM).
Can anybody give me any pointers?
Thanks in advance!
Chris
FOLLOW US
Get the latest news in Application Packaging