Improper uninstallation of older version on new Installtion - Advanced Installer Community
alokd
Posts: 2
Joined: Thu Jul 24, 2014 6:42 am

Improper uninstallation of older version on new Installtion

I am using Advanced Installer 6.4.1 for preparing MSI. Till now I was using Per-user only (with administrator rights required), in the install parameters section, but now due to changes in the requirements I have changed it to Per-machine if user is administrator, per-user otherwise. But on installing a MSI prepared with this new installation parameter, the folders of the older version(of the MSI already installed) are not removed as was done before on every new installation. Please suggest if there are any other modifications required, to support this change.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Improper uninstallation of older version on new Installt

Hello and welcome to Advanced Installer forums,

In order to achieve that you can create your own custom action which will uninstall the older versions of your product.
For example, you can create your custom action as a custom action written in C# or a custom action written in C++

Then you can go in the “Custom Actions” page and add a predefined Launch attached file custom action with sequence. This type of custom action can execute an application (EXE or DLL) or run a script (VBScript or Java script). Also, the source file will be embedded in the MSI file but will not be deployed at install time with the other application files.

It is recommended to schedule this custom action before "Wizard Dialogs Stage" -> "Paths Resolution" standard action. This way it will run right before the installation starts.

If you renew your Maintenance Plan you can use our predefined Uninstall previous versions custom action.

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
alokd
Posts: 2
Joined: Thu Jul 24, 2014 6:42 am

Re: Improper uninstallation of older version on new Installt

Thanks a lot for your valuable suggestion. But as mentioned by you, we are using our own custom action for removal of folders with older version each time a new MSI is installed.It was working fine as far as we used Per-user only (with administrator rights required), in the install parameters but did'nt work fine on changing the parameter to Per-machine if user is administrator, per-user otherwise, i.e. the folders with previous versions were not removed this time.

Return to “Common Problems”