drivard
Posts: 50
Joined: Wed Dec 05, 2007 10:14 pm

Prevent maintenance dialog from appearing

Hi,
I would like to prevent the Maintenance dialog (modify/repair/remove) from appearing when the user runs our installer when the same version of the product is installed.
I would like to display a message to the user, and then exit the installer. I'm sure this is possible, but I'm not sure how to do it.

Additionally, I am using the Graphite theme right now, and when this dialog appears, I get a string at the top of the text area that says "0KB".
I can't determine where this is coming from.

thanks for your help,
Dennis
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Prevent maintenance dialog from appearing

Hi Dennis,

How will your user be able to uninstall your product if you disable this option.
You can use the Installed property to condition an "Error Message" UI Custom Action to appear.
Additionally, I am using the Graphite theme right now, and when this dialog appears, I get a string at the top of the text area that says "0KB".
I can't determine where this is coming from.
I am not exactly sure what text area you are referring to. Could you explain this in more detail please?

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
drivard
Posts: 50
Joined: Wed Dec 05, 2007 10:14 pm

Re: Prevent maintenance dialog from appearing

Hi,
I've attached a screen shot showing the 0KB issue.
Attachments
maintenance_issue.PNG
maintenance_issue.PNG (144.34 KiB) Viewed 11020 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Prevent maintenance dialog from appearing

Hello,

I am afraid I could not reproduce this issue. Please send your aip project file to support at advancedinstaller dot com so we can further investigate the issue.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
drivard
Posts: 50
Joined: Wed Dec 05, 2007 10:14 pm

Re: Prevent maintenance dialog from appearing

Hi Gabriel, I will send my AIP via email.
I would like to point out that if you can help me solve the first issue (actually prevent this dialog from appearing at all), that will solve it.
I pointed out the 0KB because I wondered if it is a bug.

Anyway, check your email shortly.

regards,
Dennis
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Prevent maintenance dialog from appearing

Hi Dennis,

I am afraid I could not reproduce the 0KB issue with your project either. It might be a caching issue, so just delete the cache folder and rebuild the project.

As for preventing the repair, you can try my suggestion from the second post.

I am attaching a sample project implementing this. Let me know if it helped.

Best regards,
Gabriel
Attachments
sample.aip
(9.18 KiB) Downloaded 491 times
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
drivard
Posts: 50
Joined: Wed Dec 05, 2007 10:14 pm

Re: Prevent maintenance dialog from appearing

Hi Gabriel,
I'm not convinced it is a caching issue, because it has always been present, and when we post builds for QA, it is with a clean tree.

Regarding the second post:
How will your user be able to uninstall your product if you disable this option.
You can use the Installed property to condition an "Error Message" UI Custom Action to appear.
My intention is to require the user to remove the application through add/remove, rather than simply re-running the installer. There are several UI issues with the current maintenance dialog, one of which is the one I mentioned that you are not able to reproduce.
The other is that the built in string for the Maintenance sequence is something like "[ProductName] has been successfully uninstalled", regardless of if the user selected modify, repair, or uninstall. I have changed to the string to make it somewhat more generic, but it is still not really acceptable to QA.

The issue I have with using the "Installed" property is that installs or upgrades of newer versions are prevented.
I suspect that the answer is to use a search property, and condition the error message on that, but I am not sure exactly how to configure that search property in this case.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Prevent maintenance dialog from appearing

Hi,

It might be that the text where 0KB is displayed is translated in one of your dictionaries so that it displays 0KB. Try checking the custom dictionaries you are defining in your project.
The other is that the built in string for the Maintenance sequence is something like "[ProductName] has been successfully uninstalled", regardless of if the user selected modify, repair, or uninstall. I have changed to the string to make it somewhat more generic, but it is still not really acceptable to QA.
The texts you are referring to are controlled using a Control Condition, on the ExitDlg.
You can easily create another text on the ExitDlg and use a Control Condition to display only during a repair (for example). Then create another to be displayed during modify. Manipulate the Control Conditions to display the texts when appropriate. You can thus define your own text to be displayed during a repair (or modify).

If you only want the user to remove/repair your product using the control panel, you can condition the error message using something like:

Code: Select all

Installed AND (UILevel > 3)
The UILevel property indicates whether the installer is running in full UI, basic UI or NONE. Full UI means UILevel = 4. This should also allow updates. Note that doing a "Change" on the product from Control Panel will also not work, since this option always displays a full ui (which you are trying to prevent). Thus, you might want to disable "Modify" from the "Product Details" page in Advanced Installer.

Do let me know if this helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
drivard
Posts: 50
Joined: Wed Dec 05, 2007 10:14 pm

Re: Prevent maintenance dialog from appearing

Hi Gabriel,
I will try your suggestions tomorrow, as I am in the middle of something else. I appreciate your patience here :)
wodenx
Posts: 4
Joined: Mon May 03, 2010 3:07 am

Re: Prevent maintenance dialog from appearing

Hello
I'm wondering if there was a resolution to this issue. I would also like to disable the maintenance dialog. I was able to accomplish it by setting a registry key value and conditioning an error message on that, but it's not ideal as i would like users to be able to install the software without admin status. i tried conditioning the error message on an extended search for the product code, but couldn't get that to work.
also, my error message appears on top of the standard dialog rather than by itself, which is not exactly what i want.
thanks
-chris
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Prevent maintenance dialog from appearing

Hi Chris,

Did you try conditioning with:

Code: Select all

Installed AND (UILevel > 3)
as mentioned in my above post?

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
wodenx
Posts: 4
Joined: Mon May 03, 2010 3:07 am

Re: Prevent maintenance dialog from appearing

hi gabriel

thanks for getting back to me so quickly. so sorry - apparently i had tried that as a custom launch condition (where it doesn't work), but not as an error message custom action (where it does). my bad. however, it still follows the error message with the "installation failed" dialog, which seems reundant. any way to perform this check before the UI sequence begins?

also, there are circumstances in which i'd like to run the installation in passive mode, but still show an error/completion message. is there any way to add the msiUILevelEndDialog bit to the UI level?

finally, on a somewhat different topic (i can repost to another thread if necessary) - i would like to launch my product automatically when installing in passive mode. i added a custom action to the InstallFinalize step, and this works fine - but generates an error when the product is uninstalled (bc the program to be run is no longer there). I tried conditioning this action on "Installed" but then it doesn't run at all. Any suggestions as to the right condition to use?

thanks muchly
-chris
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Prevent maintenance dialog from appearing

Hi Chris,
thanks for getting back to me so quickly. so sorry - apparently i had tried that as a custom launch condition (where it doesn't work), but not as an error message custom action (where it does). my bad. however, it still follows the error message with the "installation failed" dialog, which seems reundant. any way to perform this check before the UI sequence begins?
I am afraid Windows Installer does not support this behavior. You could try terminating the installer process using the terminate process custom action. But that is up to you.
also, there are circumstances in which i'd like to run the installation in passive mode, but still show an error/completion message. is there any way to add the msiUILevelEndDialog bit to the UI level?
I am not sure I understand this. Could you please rephrase? What do you mean by "msiUILevelEndDialog"? Do you mean "silent install" (i.e progress bar only) when saying "passive mode"?
If you are trying to display a message box at the end of the installation, you can use the Message Box custom action and place it after InstallExecute or InstallFinalize standard actions.
I tried conditioning this action on "Installed" but then it doesn't run at all.
You can try "NOT Installed" instead, so it only runs during installation, when your product is not yet installed.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
wodenx
Posts: 4
Joined: Mon May 03, 2010 3:07 am

Re: Prevent maintenance dialog from appearing

hi gabriel-
I am not sure I understand this. Could you please rephrase? What do you mean by "msiUILevelEndDialog"? Do you mean "silent install" (i.e progress bar only) when saying "passive mode"?
that bit is described here: http://msdn.microsoft.com/en-us/library ... 85%29.aspx - yes - by passive mode i mean silent (ie invoking the installer with the /passive option as described here http://msdn.microsoft.com/en-us/library ... 85%29.aspx. i am suppressing the UI by specifying that option in the "command line" field of the "bootstrapper" tab of the "media" section. is there another, preferred, way of controlling the UI level?
If you are trying to display a message box at the end of the installation, you can use the Message Box custom action and place it after InstallExecute or InstallFinalize standard actions.
the problem i'm having is that when i condition my error message on UILevel>3, it doesn't display when running silently. i tried your suggestion above (i'm assuming you mean a script inline to display a message box - i didn't see a "mesage box" custom action). but the message is also suppressed when running silently. also, when i run the installer a second time (ie with the product already installed) in silent mode, it seems to complete normally (this is on XP-SP3) - i can't tell if it's automatically uninstalling the previous version, or just not doing anything.

what i would like is the following behavior:
1. when installer is run the first time, silent installation and then a dialog at the end saying "installation complete".
2. when run again with the same product code, an error message saying "this version already instaled - please use add/remove programs &c."
3. when run again with new product code, automatic upgrade of the previous version.
i can get this to work as you suggested if running with full UI, but not in passive (or silent) mode.
You can try "NOT Installed" instead, so it only runs during installation, when your product is not yet installed.
yes - i figured that out and it seems to work. however, i note that when i run the installer a second time with same product id, this app is still launched at the end. this seems curious, as then the "installed" property should be true. unless, in fact, what's happening is that the installer is automatically uninstalling the previous version before even getting around to processing the new database.

any light you can shed on these matters would be greatly appreciated
thanks
-chris

Return to “Common Problems”