sandeep.gvn
Posts: 26
Joined: Wed Jan 15, 2014 11:55 am

How to uninstall an existing application?

Hi,

Is it possible to uninstall an existing application which was built by using Wix or some third party installer? If so, how could we achieve this?


Regards,

G.V.N.Sandeep
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to uninstall an existing application?

Hi Sandeep,

In order to achieve this you can go in the Upgrades page, click on the [Upgrade] toolbar button and in the newly appeared dialog add the "Upgrade Code" of the application that you want to uninstall.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sandeep.gvn
Posts: 26
Joined: Wed Jan 15, 2014 11:55 am

Re: How to uninstall an existing application?

Hi Eusebiu,

Thanks for the information.. I have a question for you.. How would I take a backup of particular file before uninstalling the earlier version using Advanced Installer. Can you help me with a sample.

For Example: I have a older version of my application which was installed using Wix. Now I am creating an installer for my application using Advanced Installer. During the upgradation process.. I would like to take a backup of a file lets say "Configuration.xml" and then uninstall the older version completely, and then proceed further to install the latest software update.

As per the earlier question, I understood that we need to provide the Upgrade Code that was provided in my earlier installer. Plz.. help me in taking a backup of

Regards,

G.V.N.Sandeep
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to uninstall an existing application?

Hi Sandeep,

In order to achieve what you want you can follow the steps below:
- create a simple BAT file with only the following line:

Code: Select all

copy %1 %2
- go in the Files and Folders page and add this file in the project using the [Temporary Files] toolbar button
- go in the Search page and create a new registry search which takes from the registry the path where the old version is installed (you can rename it to OLD_PRODUCT_PATH)
- go in the Custom Actions page and create two "Launch File" custom actions, one before "Preparing" and the other after "Add Resources", and configure them like below:
  • File To Launch: [&copyfile.bat]
    Command Line: "[OLD_PRODUCT_PATH]Configuration.xml" "[TempFolder]"
    Immediately
    Execution Stage Condition: Install

    File To Launch: [&copyfile.bat]
    Command Line: "[TempFolder]Configuration.xml" "[APPDIR]"
    When the system is being modified (deferred)
    Run under the LocalSystem account with full privileges (no impersonation)
    Execution Stage Condition: Install
-build and run the project

I also attached a sample AIP file and a BAT file, so you can take a look of them and also test them. In the AIP I attached you have to set the correct registry path for the search that I created in the Searches page.

Let us know if this helped.

Best regards,
Eusebiu
Attachments
Copy file.zip
(3.07 KiB) Downloaded 477 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”