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

Uninstalling on XP


1 reply to this topic

jonathan2002

jonathan2002
  • Members
  • 44 posts

Posted 23 October 2002 - 11:06

I have a basic MSI project that uses some Installscript custom functions to make changes to files and also in the registry. This installs and uninstalls fine, if it is run by running "setup.exe".

On Windows XP systems, there is the possibility of removing by using the "Add/Remove programs" option on the Control panel. This does not achieve a full uninstall, because it does not run some clean-up custom actions.

I have tried putting the actions in the "Execute" sequence and setting a condition to detect if the install is running on XP in silent mode. However, the condition is not detected.

What I need to know is:
1. what condition can I check to see if the application is being uninstalled in this way?
2. is it suffiecient to put the relevant custom actions in the "Execute" sequence, with this condition?

arfinsd

arfinsd
  • Members
  • 28 posts

Posted 25 October 2002 - 22:46

FAQ: How Can I Tell if an InstallScript MSI Setup is Running from the Add/Remove Programs Applet?
Document ID: Q105949
This article applies to the following:
Product(s): InstallShield Developer - All Versions
Last Revised On: 10/16/2002
Question
I want to know if my user is running the uninstallation from the add/remove applet or from the media. How can that be done?


--------------------------------------------------------------------------------

Answer
This can be done by following the steps below:
Add a property to the CmdLine entry of setup.ini, such as:

CmdLine=NOTADDREMOVE=1

In the script, use the MsiGetProperty function to get the value of NOTADDREMOVE.

If the value is 1 (as specified in the INI entry), then it can be determined that the user is running the uninstallation from the media. Otherwise, setup.exe was not used to launch the uninstallation, in which case the user is uninstalling from the Add/Remove Programs applet in Windows.


--------------------------------------------------------------------------------

Additional Information
This can also be done with InstallShield Professional 6.x. More information can be found in Knowledge Base article Q104327, HOWTO: Allowing Setup to Tell whether It Is Being Run from the Add/Remove Programs Dialog Box.


--------------------------------------------------------------------------------


References
Refer to the MSI help article titled "MsiGetProperty" for more information on this property.

Hope this helps....alex
Alex Ferguson
www.SolimarSystems.com