Re-cached msi still running old custom action

浪子不回头ぞ 提交于 2019-12-07 05:15:54

问题


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.


回答1:


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).




回答2:


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).



来源:https://stackoverflow.com/questions/16901433/re-cached-msi-still-running-old-custom-action

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!