FileNotFoundException during upgrade - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

shawn
Posts: 6
Joined: Mon Nov 26, 2007 5:14 am

FileNotFoundException during upgrade

I've been testing out the Enterprise version of your product and so far it rocks! Much nicer than working with Visual Studio's limited interface.

However, I'm having a problem with custom actions during an upgrade. I wrote a simple Hello World program in C# (HelloWorld.exe), along with a CA in C# (HelloInstaller.dll). The CA just pops up a message box in each of Install, Uninstall, Commit and Rollback. I then created two installers, each with a different version number and Product Code. Installing and uninstalling each of these independently works just fine, displaying the appropriate CA message boxes at the correct times. I should note that I'm using different Execution Conditions on the CA's so that the Install and Commit run on new installs and upgrades ((NOT Installed) OR (UPGRADINGPRODUCTCODE)), and the Uninstall runs only on an uninstall and not on an upgrade ((REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE)). These seem to work as expected.

The problem comes when I install the first version and then try to upgrade to the second version. The install of the second version fails when it tries to call the Install CA. It gets a System.IO.FileNotFoundException saying that it can't find C:\Program Files\Hello Enterprises\Hello World\HelloInstaller.dll. If I look at that directory, the only file there is HelloInstaller.InstallState.

So, is this a bug or am I missing some setting or doing something wrong?

If I can get by this problem I'm pretty sure we'll be buying a copy of the Enterprise edition.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I cannot reproduce this behavior on my test machine.

Please note that when using the Automated Upgrade feature you obtain the upgraded MSI by modifying the original one. There is a discussion about this feature on the forum, please take a look:
http://www.advancedinstaller.com/forums ... de+feature

If the problem persists please send us a test case reproducing this behavior to support at advancedinstaller dot com so we can investigate the problem.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shawn
Posts: 6
Joined: Mon Nov 26, 2007 5:14 am

This turned out to be a problem with the conditions I was using. What I should have used was:

Install and Commit: $HelloWorld.exe = 3
Uninstall: $HelloWorld.exe = 2

$HelloWorld.exe is a "Component Action" for my main program. 3 means "is being installed", which is true for the first install or an upgrade. 2 means "is being uninstalled", which is true for an upgrade or an uninstall.

Return to “Common Problems”