How can I perform a silent uninstallation as part of the upgrade process on Windows?

asked 13 Sep '11, 06:50

Jake's gravatar image

Jake ♦♦
accept rate: 98%

You can retrieve the path to the uninstaller from the Windows registry and storing it in an installer variable.

<!-- In particular, this "${product_fullname} ${product_version}" string will make the installer detect its own previous installation. You will need to change it to match with the program and version you want to uninstall. -->

    <key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${product_fullname} ${product_version}</key>

Then, you can execute the path stored in ${uninstaller_path}, in case it exists:

<!-- run the uninstaller program only if ${uninstaller_path} points to an existing file -->


    <programArguments>--mode unattended</programArguments>








Similar solutions can be applied to detect a previous installation directory as well.


answered 13 Sep '11, 06:51

Jake's gravatar image

Jake ♦♦
accept rate: 98%

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]( "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: 13 Sep '11, 06:50

Seen: 2,499 times

Last updated: 15 Sep '11, 06:51