Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Uninstall application


1 reply to this topic

haggag87

haggag87
  • Full Members
  • 4 posts

Posted 14 September 2011 - 15:59

I think I should explain to you my current scenario here it is:
I have three packages(installers) one of them is called “The core” and the other two is dependent on it,
During installation: if you tried to install one of the two dependent packages and the core package wasn’t found you won’t be able to complete the installation and the installer will abort telling you that you have to install core package first, and if you tried to install one of the two dependent packages and the core package was found (already installed) the installation will be completed successfully.

During uninstallation: If you tried to uninstall the core package and any of the two other dependent packages was installed the installer will tell you that you have to uninstall the dependent packages first before uninstalling the core package cause if you removed the core the other packages won’t work.

I’ve done all this, the problem is that now I need that: case the three packages are installed on a computer and there are some changes so I want to install the new version of the three here what I think it need to be done:
For sure I’ll have to install the new core 1st as it is the main package so incase I did it using the upgrade I think it will uninstall the old core package but the problem is that the uninstallation of the old core runs it will not be completed as I have to uninstall the other 2 dependent packages first (the explained above condition)

So what I tried is to use a script found in this bottom of this page http://www.installsi.../isp_uninst.htm in the preinstallation function of the core package and call it three times passing to it the GUID as a string in each time, the 1st call is to uninstall one of the dependent package if found, the 2nd to uninstall the other dependent package and the last one to uninstall the old core and this the sequence I wish,
And here is the three commands I use to call the function:
UninstallPreviousVersion("{ED1342C6-8073-4123-93CA-A3568C5E08D4}");
UninstallPreviousVersion("{41C6757F-36D9-4E1D-9D2E-A64BB27BF141}");
UninstallPreviousVersion("{D5A8968F-9FA8-4A3A-BBDE-D2905BD216EB}");

Also I tried using the uninstallapplication function but I couldn’t as I don’t know what paramerters to pass and how to run it before the installation,
I tried a lot to use it but I couldn’t here are some of the trials:
1- szInstalledVersionGuid = "{41C6757F-36D9-4E1D-9D2E-A64BB27BF141}";
szParams = "/x /qn /s";

2- UninstallApplication("{41C6757F-36D9-4E1D-9D2E-A64BB27BF141}","/passive;/uninstall",LAAW_OPTION_WAIT);
3- added the option |LAAW_OPTION_HIDDEN

Also I thought about using major upgrade but when I read about it I found that it will change the GUID but I don’t want to change it as it is used by many applications(fixed) so will the minor upgrade helps?
So this is my current scenario and I wish if you could help me add this feature to my packages.

By the way I’m using install shield 2008
Thank you very very much in advance and sorry for annoying you
waiting for your reply

Regards,


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 September 2011 - 13:40

You posted this question in two places: under "InstallScript MSI" and "Basic MSI" projects. The answer will probably depend on the actual project type you are using, so please clarify which project type these setups are.