amejia
Posts: 22
Joined: Mon Sep 29, 2008 3:35 pm

UNINSTALL PRODUCT

HI,

I WANT TO UNINSTALL ONE PRODUCT WHEN I RUN MY INSTALLATION.

CAN SOMEONE TELL ME HOW CAN I ACHIEVE THAT? I TRIED A CUSTOM ACTION BUT I GOT A LITTLE CONFUSED ABOUT THAT
REGARDS
cyb
Posts: 43
Joined: Wed Apr 15, 2009 1:06 pm

Re: UNINSTALL PRODUCT

Hi,

If that product is a MSI, you can add a custom action in the InstallUISequence->Begin that allows you to run a msiexec.exe command line.
The command line that you can enter is:

Code: Select all

msiexe.exe /x <ProductCode>
where where "<ProductCode>" is the product code of your old package. Eventually, you can add the "/qb" parameter so that the user will not be prompted in any way.
You can read this HowTo for more help.
However, if the Product is not a MSI, you can look over this article, at "The old package is created with another tool and it is not MSI-based".
Best regards,
cyb
Cosmin Budrica
Advanced Installer Team
http://www.advancedinstaller.com/
amejia
Posts: 22
Joined: Mon Sep 29, 2008 3:35 pm

Re: UNINSTALL PRODUCT

Hi COsmin.

I added the custom action but nothing happens. I try to run the condition in the comand line and it works but not from advanced installer.

This is how I created the condition:
1) InstallExecuteSequence" -> "begin"
2) create a new "Exe with working dir" custom action
3) set the "Working Dir" field to SystemFolder
4) set the "Command Line" field to [SystemFolder]msiexec.exe /x {5CE96E5C-974E-44FA-A5B8-17C46A62BCF3}

but no results

Any ideas how I can check what is happening?
cyb
Posts: 43
Joined: Wed Apr 15, 2009 1:06 pm

Re: UNINSTALL PRODUCT

Hi,
amejia wrote: This is how I created the condition:
1) InstallExecuteSequence" -> "begin"
Multiple execute sequences cannot run at the same time. That is why, this custom action should be placed under the IntallUISequence.
Try this approach, and let us know if you encounter any problems.

Best regards,
cyb
Last edited by cyb on Tue Apr 28, 2009 12:41 pm, edited 1 time in total.
Cosmin Budrica
Advanced Installer Team
http://www.advancedinstaller.com/
amejia
Posts: 22
Joined: Mon Sep 29, 2008 3:35 pm

Re: UNINSTALL PRODUCT

Hi Cosmin.

I tried that and not news.

I will attach a screen shot on how i have configured the custom action.

Let me know if you see any issue with that.

Alejandro
Attachments
scrshot.jpg
scrshot.jpg (83.24 KiB) Viewed 6710 times
amejia
Posts: 22
Joined: Mon Sep 29, 2008 3:35 pm

Re: UNINSTALL PRODUCT

Ok I am able to uninstall the file but then i want to install the same product i uninstalled but with a newer version.

I tried everything (Chained packages, custom actions) and seems that the package with the new version doesnt get executed.

Any suggestions on how to run the new version of the uninstalled file?

/Alejandro
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: UNINSTALL PRODUCT

Hi Alejandro,

I noticed that the custom action uses the condition:

Code: Select all

REMOVE = "ALL"
This will make it run only during an uninstall. Please set the condition to:

Code: Select all

(Not Installed)
I also noticed that the custom action uses the "Asynchronous execution, do not wait for return" option. This will make Windows Installer start the custom action, but don't wait for it to finish. Please try using the "Synchronous execution, ignore return code" option.

When using these settings, the package should automatically uninstall the package which has the Product Code {5CE96E5C-974E-44FA-A5B8-17C46A62BCF3}.

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

Return to “Common Problems”