Adding dialog breaks maintenance mode - 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!

timc
Posts: 20
Joined: Wed Apr 30, 2008 12:43 am

Adding dialog breaks maintenance mode

Hi,

In either a new project or an MSI import project, before adding a dialog, the installer goes into maintenance mode when the product is already installed. After adding a dialog and going through the same steps, instead of going to maintenance mode, the prior product is uninstalled and the new application setup routine starts over. I've tried three different dialogs, and they all trigger this behavior.

How can I preserve maintenance mode when adding or modifying dialogs?

Thanks,
Tim
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Adding dialog breaks maintenance mode

Hi Tim,

A MSI installation package enters into Maintenance mode only if it's launched when it is already installed on the target machine. When you add a new dialog to the MSI package and build it, a new Package Code is generated for the MSI, therefore Windows Installer considers it a new package.

Although it is not recommended and we do not encourage it, you can do what you need by making sure that the old and new packages have the same Package Code:
- add your custom dialog and build the new MSI
- open the old MSI with Orca
- go to the "View" -> "Summary Information" menu in Orca
- copy the GUID in the Package Code field on the "Edit Summary Information" dialog
- open the new MSI with Orca
- go to the "Edit Summary Information" dialog and paste the GUID in the "Package Code" field

Since the two MSI package will have the same Package Code, both of them will trigger the Maintenance mode of the one installed.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
timc
Posts: 20
Joined: Wed Apr 30, 2008 12:43 am

Re: Adding dialog breaks maintenance mode

Hi Cosmin,

I didn't quite get to the real issue last time. Adding a dialog triggered it, but that turns out not to be the problem. Here is some more detail on how to reproduce.

0. verify product not installed
1. open installer project and compile both DefaultBuild and Build (this may not matter, but I'm creating a Setup.exe in addition to the MSI)
2. use Orca to collect the Package Code
3. run installer at the command line via Setup.exe or MyApp.msi (package is now installed)
4. run installer at the command line via Setup.exe or MyApp.msi a second time, observe maintenance dialog, CANCEL (product still installed, Package Code unchanged)
5. use Orca to verify the Package Code is unchanged

So far the behavior is exactly what I expected. I've run steps 2 and 3 with both Setup.exe and MyApp.msi in every permutation, with no problems whatsoever.

But then two unexpected things occur when running the project using the [ Run ] toolbar button: instead of seeing the maintenance dialog, the product is silently uninstalled and the original install dialog is displayed. If I cancel the silent uninstall on a second try, after finishing the cancel operation the maintenance dialog appears.

Shouldn't the Run button behave exactly the same way as a command line execution of the MSI or Setup.exe?


By the way, the Run button runs DefaultBuild, if I'm reading this page correctly http://www.advancedinstaller.com/user-g ... jects.html. In any event, both Setup.exe and MyApp.msi work properly when run from the command line, so this may be an unimportant distinction.

Thanks,
Tim
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Re: Adding dialog breaks maintenance mode

Hi Tim,

Note that if you use the "Project->Run" menu option Advanced Installer automatically triggers the uninstallation of the old MSI before installing the new one. This is because with each build a new PackageCode is generated (the PackageCode identifies a unique MSI package). The maintenance mode appears only when a package that is already installed is launched.

Also when "Project->Run" is used the last created build is launched. If all build are created at the same time, first build in list is launched.

Kind Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
timc
Posts: 20
Joined: Wed Apr 30, 2008 12:43 am

Re: Adding dialog breaks maintenance mode

Apologies for any confusion going back to my original question about adding dialogs. Let me be clear: I am NOT rebuilding the package.

If I do nothing except use "Project->Run" twice in a row with a previously built package, the first one installs, the second one silently uninstalls then reinstalls. The PackageCode is UNCHANGED because the package is unchanged.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Adding dialog breaks maintenance mode

Hi,
I do nothing except use "Project->Run" twice in a row with a previously built package, the first one installs, the second one silently uninstalls then reinstalls.
I cannot reproduce this behavior on my test machine. Can you please give me more details about the Advanced Installer version you are using? Have you tried re-installing Advanced Installer?

If you run the project and then run it again, the package will be launched in Maintenance mode. However, if you modify something in the package after running it, it will be considered a different package and the project will be rebuilt.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
timc
Posts: 20
Joined: Wed Apr 30, 2008 12:43 am

Re: Adding dialog breaks maintenance mode

Hi Cosmin,

It seems to be an issue with one of my machines. I rebooted it, and reinstalled AdvancedInstaller (version 6.2 by the way), but nothing helped. However, using AdvancedInstaller in exactly the same way on another machine works perfectly. :?

I'm confused as to what might cause it to behave this way, but it doesn't seem to be a software issue.

Thanks for your help.

Cheers,
Tim
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Adding dialog breaks maintenance mode

Hi,

Please try deleting the cache folder created by Advanced Installer in the build folder. Also, make sure that you don't use any synchronized folders in your project (this may be a cause of the problem). After this, run the project two times without modifying anything.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”