-1

I have a CustomAction inside my MSI Project with a condition of MsiPatchRemovalList, this is because i need to execute this for each patch uninstall process.

This is working properly, when i execute the uninstall patch it is executing the CustomAction and do the process refere to the specific patch without error.

The problem is when i uninstall the MSI, all patches are uninstalled but the event is not fired.

Note: execute in the MSI uninstall is not an option because this event need to do a process specific for each patch

Update: The custom action process is take the MSIPATCHREMOVE element to know the Patch Guid and create a register key using this guid, in the register to have a historic to know what patch was uninstalled

4

1 に答える 1

2

(MsiPatchRemovalList または REMOVE="ALL") の条件を持つことができるはずです。

アンインストール時に製品に適用されたパッチを知る必要がある場合は、インストールの前に MsiEnumPatches (または同等のもの) への呼び出しを組み込み、アンインストール時にそれらを渡すなどの操作を行う必要があります。コマンドライン:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa370099(v=vs.85).aspx

もう 1 つの方法は、パッチごとに (たとえば) パッチ GUID を含むレジストリ エントリを追加して、効果的に独自のリストを作成することです。次に、可能性のあるパッチまたはリストのそれぞれについてレジストリ検索を実行し、標準のパッチ削除リストと同様のプロパティを設定できます。私はこれを完全に考えていませんが、各パッチがレジストリに「私はここにいます」という何かを追加する場合、独自のパッチ削除リストを作成しているため、パッチ削除リストにあまり依存する必要はありません.

于 2018-03-16T18:58:23.947 に答える