Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Custom action not run during upgrade


4 replies to this topic

quakey

quakey
  • Full Members
  • 33 posts

Posted 20 November 2004 - 04:21

Hi,

I have a custom action that would be called on install. In other words, it will only
get exectued if the condition "NOT Installed" is true. However, I noticed that if
I run an upgrade installation over an older version, that action doesn't get executed
at all. So I gussed maybe if I did the condition "REMOVE=''" (so it will be run as
long as it is not an uninstall) it would work, but it didn't.

Please someone give me some help. Thanks!


BTW, I love this place. I have received many helpful responses in this forum!

mandy

mandy
  • Members
  • 121 posts

Posted 20 November 2004 - 11:57

Try something like "REMOVE<>ALL".

quakey

quakey
  • Full Members
  • 33 posts

Posted 23 November 2004 - 01:11

QUOTE (mandy @ 2004-11-20 11:57)
Try something like "REMOVE<>ALL".

Hi,

Thank you again.

Unfortunately, I just realized that it was not the problem with the action not being called during upgrade. Rather, it is a problem because a custom action in the script it called again during upgrade at uninstall.

Basically my installer needs to register a DLL during install and unregister on uninstall. The action to unregister is only executed if REMOVE~="ALL". Now, during an upgrade, I noticed that Windows Installer first install the new version and THEN uninstall the old version. So the sequence is like:

Install new version and register DLL -> uninstall older version and unregister DLL

Because of that, the newly installed version won't work because the DLL is unregistered
at the end of the sequence!

Is there a way to only run the action that unregisters DLL during uninstall but NOT during an uninstall during an upgrade? Or maybe is there a way to tell Windows
Installer to uninstall the older version first and then install the new version?

Thanks!!


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 November 2004 - 10:00

You could move RemoveExistingProducts earlier in the sequence.

quakey

quakey
  • Full Members
  • 33 posts

Posted 23 November 2004 - 23:46

QUOTE (Stefan Krueger @ 2004-11-23 10:00)
You could move RemoveExistingProducts earlier in the sequence.

Thanks! That did it.