jerryz
Posts: 13
Joined: Fri Mar 08, 2013 11:51 am

Resource CleanUp behaviour

Hello,
We need to cleanup some directories during unistallation, but only if user wants to do it. We use CleanUp Wizard, but if we run uninstalltion in silent mode, then the directories are removed without asking user - which is what we don't want.
Is there any way how change this default behaviour - remove dirs only if user manually checks the "Remove..." checkbox? We tried to use custom action which set AI_CLEAN_RESOURCES_UNINSTALL to 0, but it seemed to have no effect.
Thanks for any help or tips.
J
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Resource CleanUp behaviour

Hi,

In order to achieve what you want you can use the following command lines:

Code: Select all

msiexec.exe /x <product_name> /qn AI_CLEAN_RESOURCES_UNINSTALL=""
which will not remove your directories
OR

Code: Select all

msiexec.exe /x <product_name> /qn AI_CLEAN_RESOURCES_UNINSTALL=1
which will remove your directories.

If you want to prompt the user and let him choose if the directories will be removed or not, you can create a custom action that will display a [Yes/No] message box when the uninstallation is run in silent mode and based on the option he choose, the "AI_CLEAN_RESOURCES_UNINSTALL" property will be set to "1" or to "" (empty).

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jerryz
Posts: 13
Joined: Fri Mar 08, 2013 11:51 am

Re: Resource CleanUp behaviour

Is it possible to set AI_CLEAN_RESOURCES_UNINSTALL from inside the setup.exe package. We don't want users to set any properties from command line, just to make default action "Not to remove resources" (AI_CLEAN_RESOURCES_UNINSTALL="0"). Thanks for help.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Resource CleanUp behaviour

Hi,

If you want to set the "AI_CLEAN_RESOURCES_UNINSTALL" property so that the resources not to be removed on silent uninstall, you can go in the Custom Actions page and add a "Set installer property" custom action below "Wizard Dialogs Stage -> Searches" action group with the following configurations:
  • Property: AI_CLEAN_RESOURCES_UNINSTALL
    Value: {}
    Condition: UILevel = "2"
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jerryz
Posts: 13
Joined: Fri Mar 08, 2013 11:51 am

Re: Resource CleanUp behaviour

I did what you told me, but during silent installation (using /qn switch) it didn't work. Are "Wizard Dialog Stage" custom actions executed while "UILevel < 3" (no GUI)?
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Resource CleanUp behaviour

Hi,

Sorry for my mistake. Indeed the "Wizard Dialogs Stage" actions are not executed in silent mode. So, you should place the "Set installer property" custom action below the "Install Execution Stage -> Searches" action group and it will work fine.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”