Click to See Complete Forum and Search --> : WebSetup does not delete installation-directory after rollback (.tmp file persists)


Dennis!
January 12th, 2010, 08:19 AM
Hey folks,

i search for a while now, but could not find any clue on how to solve my problem.
When i throw a InstallException within my customActions code to force a rollback by msi, my already created installation directory wont be deleted.
This is what happens:

The files of my application are already created and saved to the installation directory. While a rollback is in progress all this files will get deleted. Except one file:
the .dll of the current project will be renamed to a .tmp file and not be removed.
Therefore the installation directory is not empty and standard rollback mechanisms wont delete the installDir.

This problem only persists while doing rollback. Deinstalling the application works just fine (because no .tmp file is created).

Deleting the file within customAction (OnAfterRollback) does not work, because the .tmp file is originally the .dll and therefore locked, because it is in use by the same customAction \o/

Anyone have an idea on how to whether delete the .tmp file or avoid it to be created in the first place?

Thx
Dennis