We use the file lock test during install readyToInstallActionList stage to prevent installation while the app is running, and it works fine:


But this exact same action has no effect during the uninstall preUninstallationActionList stage:


How can I make a similar check before uninstall and stop the uninstall until the app is not in use?

I have verified with Microsoft's Handle (Sysinternals) utility that the file is indeed locked.

asked 20 Dec '16, 11:39

cjw's gravatar image

accept rate: 0%

If an error is found during uninstallation, it is silently ignored and the uninstallation continues, although the rest of actions are not executed.

In this case you can use <exit exitCode="1"/> and <showWarning> in an <actionList> like in the following example:

          <text>You must close the application ${project.fullName}
          before launching the uninstaller</text>
        <exit exitCode="1"/>
         <processTest name="${project.fullName}.exe" logic="is_running" />

answered 22 Dec '16, 10:51

Michiel's gravatar image

Michiel ♦
accept rate: 21%

Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: 20 Dec '16, 11:39

Seen: 202 times

Last updated: 22 Dec '16, 10:51