PDA

View Full Version : uninstall application



rofugon7
07-11-2007, 06:15 AM
Hello, I just create un installsield msi project. This project only install a program (Winrar), I add the winrar install file into "Support files/billboard" --> "Disk1", and in the "installscript" in the function OnFirstUIAfter of "before move data" y write this:

LaunchAppAndWait("wrar370es.exe","-s",0);

Now i want that if my application is uninstalled, winrar is uninstalled too. How can i do this?

Thanks.

RobertDickau
07-11-2007, 10:31 AM
If there is an uninstaller for that program, you might see if you can use the UninstallApplication function or just run its uninstall string when your product is being uninstalled.

Is it an option to use a Basic MSI project, possibly with InstallScript custom actions? In Basic MSI, please see this tip for information about detecting uninstallation: http://www.macrovision.com/company/news/newsletter/tips/msiconditions.shtml.

rofugon7
07-12-2007, 03:29 AM
If there is an uninstaller for that program, you might see if you can use the UninstallApplication function or just run its uninstall string when your product is being uninstalled.

Is it an option to use a Basic MSI project, possibly with InstallScript custom actions? In Basic MSI, please see this tip for information about detecting uninstallation: http://www.macrovision.com/company/news/newsletter/tips/msiconditions.shtml.


I saw your post and MSI Help Library page "Conditional Statement Syntax" but i donĀ“t know how i would use the condition "Not Installed", I'm trying with this code:

if (Not Installed) then
LaunchAppAndWait("wrar351es.exe","-s",0);
endif;

RobertDickau
07-18-2007, 09:53 AM
The Not Installed expression is just for MSI tables, and not script. If you had a custom action defined in the "Custom Actions and Sequences" view, you could give it the condition Not Installed.

To detect a first-time installation in plain InstallScript, there's:

if (!MAINTENANCE) then
// etc.
endif;Likewise, any code in one of the OnFirstUIBefore/After events runs only for a first-time installation.