cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Froedilein
Level 3

uninstall action deletes new installer?

Hi,
I have the requirement, that the installer will automatically uninstall a previous version of the application.
One prerequisite is, that the install location is fixed and the user cannot change it.
I therefore added an uninstall action to the pre-installation steps, which executes the uninstaller at "$USER_INSTALL_DIR$$/$Uninstall".
In the install step I add an Uninstaller at the same location "$USER_INSTALL_DIR$$/$Uninstall".

When I now run the installer the first time, everything runs fine, and the Uninstall is created at "$USER_INSTALL_DIR$$/$Uninstall". So far so good.
No I am running a second installation. My expectation now is, that the Installer starts, the uninstaller is executed (because of the 'execute Uninstaller action' and then the installation progress goes on and runs through.

What is happening is the following:
1.) Installer starts
2.) uninstaller is triggered and succeds (but NO file are uninstalled --> OK, solved this. The folders are speefolders, so I need to set the flag 'delete recursively')
3.) Uninstall director is deleted (that is OK)
4.) installer proceeds and installs the new files
5.) uninstaller directory and files are created
6.) suddenly the uninstaller directory get's deleted (--> bang, and here are my problems)

So, the data which is installed in the second run is OK, but for some reason, by adding the 'execute uninstaller action' will delete the newly create uninstall folder and it will also not delete the existing data (solved by setting the flag 'delete recursively')

Any idea what I am doing wrong?
Any other reliable possibilites to uninstall the product when a new product is installed.
btw, we have no complex set of features or components. We have only the two standard components common and InstallAnywhere VM componente and ONE feature.

Any help appreciated

Froed
Labels (1)
0 Kudos
(6) Replies
pv7721
Level 20

Instead of adding an Uninstaller action, I would use an Execute command in order to execute the respective Uninstaller.
0 Kudos
Froedilein
Level 3

Tried this too, but same result
0 Kudos
pv7721
Level 20

Try moving the Execute Action in the Pre-Install task.
0 Kudos
Froedilein
Level 3

it is already in the Pre-Installation task. but it does not solve the issue.
It looks for me, that there is somehow a 'filewatcher' or something else in the 'queue' which deletes the uninstall directory until the complete installer is finished. MEaning, the uninstaller (sub) process is not really finished until the complete installer is finished
0 Kudos
sprinleo
Level 3

Hallo,

my needs are exactly the same, to uninstall the existing product before its installation could begin. At the moment, discovering that the product and upgrade code are same, it pops up a dialog for upgrading the existing product. But that's not what i want 😞 it should uninstall here.

could you point me right direction please

thanks.
0 Kudos
DronidZe
Level 4

I have the same problem and it's critical for me 😞 May be someone already have found a solution to fix it?
0 Kudos