Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Re-cached msi still running old custom action

I have made a change to a custom action in my msi file to not attempt to stop a windows service if the service is stopped or stop pending. However, after re-caching the msi using msiexec /fv mymsi.msi, when running the major upgrade to the next version (which also has the corrected service stopping custom action) the verbose logging is showing that the old custom action code is still being run even though the cached msi was updated. I even ran a binary comparison of the cached msi against the one that was used in the re-caching.

What am I doing wrong here.

like image 624
user1990900 Avatar asked Jun 03 '13 16:06

user1990900


2 Answers

If the old custom action is still running it means one of two things:

  1. The new MSI logic is not correct and is still running the custom action.

  2. The recache/reinstall did not work.

To re-cache/reinstall make sure your MSI is basically identical (same ProductCode/Upgradecode etc) to the old MSI except with the updated custom action. Then do:

msiexec /fv new.msi /l*v log.txt

That will overwrite the old MSI and do a repair using the new MSI (and give you a log file in case anything goes wrong).

like image 102
Rob Mensching Avatar answered Nov 02 '22 09:11

Rob Mensching


In my case it was a cached copy of my MSI in %windir%\Installer and corresponding keys in the system registry (found them by GUID in HKLM and HKCR).

like image 2
Andrew Kondratov Avatar answered Nov 02 '22 10:11

Andrew Kondratov