Is it possible to call the unistaller, as an option (the second option would be: update), from the installer if the programm is already installed?

asked 31 Jul '15, 06:53

amlgm's gravatar image

amlgm
1112
accept rate: 0%

edited 31 Jul '15, 09:34


You can add the option using a <choiceparameter>:

  <choiceParameter>
     <name>installMode</name>
     <description>Select the installation mode</description>
     <explanation></explanation>
     <displayType>combobox</displayType>
     <width>30</width>
     <optionList>
       <option>
         <description>Upgrade</description>
         <text>Upgrade</text>
         <value>upgrade</value>
       </option>
       <option>
         <description>Uninstall</description>
         <text>Uninstall</text>
         <value>uninstall</value>
       </option>
     </optionList>
     <postShowPageActionList>
        <!-- Set upgrade mode in the project -->
        <setInstallerVariable>
          <name>project.installationType</name>
          <value>upgrade</value>
          <ruleList>
             <compareText text="${installMode}" logic="equals" value="upgrade"/>
          </ruleList>
        </setInstallerVariable>
     </postShowPageActionList>
  </choiceParameter>

And the call the uninstaller if the option is "uninstall":

     <runProgram>
        <program>${installdir}/uninstall</program>
        <programArguments>--mode uanttended</programArguments>
        <ruleList>
             <compareText text="${installMode}" logic="equals" value="uninstall"/>
        </ruleList>
      </runProgram>
link

answered 03 Aug '15, 11:32

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×157
×1

Asked: 31 Jul '15, 06:53

Seen: 584 times

Last updated: 03 Aug '15, 11:32