Extract file upon uninstall #8136
-
Is it possible to have WiX extract a file from the msi payload upon uninstall and then use in a custom action? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
What do you plan on writing the custom action in? |
Beta Was this translation helpful? Give feedback.
-
For C#/DTF the easiest way I know to do it is just include the file in the C# .csproj as content copy local. This will package it up inside the CA and place it in the current directory (or subdirectory) and made available when the C# code runs. |
Beta Was this translation helpful? Give feedback.
-
I'm saying if you add the contents of your zip to your ca .csproj it'll just be there without any additional work. If you want to be able to get it from the MSI then you'll have to call a bunch of APIs to locate the MSI (which could be missing), query a few tables, stream out the cab, extract the zip file from the cab and then extract the contents of the zip. |
Beta Was this translation helpful? Give feedback.
I'm saying if you add the contents of your zip to your ca .csproj it'll just be there without any additional work. If you want to be able to get it from the MSI then you'll have to call a bunch of APIs to locate the MSI (which could be missing), query a few tables, stream out the cab, extract the zip file from the cab and then extract the contents of the zip.