Is it possible to detect and throw an error if the program is already installed on Linux?

Thanks!

asked 13 Apr, 11:04

tech_dolphin's gravatar image

tech_dolphin
214
accept rate: 0%


You can use <fileTest> for this purpose.

  <preInstallationActionList>
    ...
    <throwError text="Program already installed">
      <ruleList>
        <fileTest condition="exists" path="${installdir}">
        </fileTest>
      </ruleList>
    </throwError>
   ...
  </preInstallationActionList>
link

answered 17 Apr, 06:39

Michiel's gravatar image

Michiel ♦
82114
accept rate: 22%

Thank you. Is there any way other than checking install directory.

(17 Apr, 09:23) tech_dolphin
1

You can check for the uninstaller to exist and then run it in --mode unattended. This is the most reliable way.

(21 Apr, 01:43) Michiel ♦
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:

×73
×41
×6

Asked: 13 Apr, 11:04

Seen: 36 times

Last updated: 21 Apr, 01:43