Replies: 1 comment
-
Well, your task description seems like a canonical WiX dev story. However, WixSharp allows us to define a complete behaviour and then execute it based on the installation type and the installation session stage. Which makes it no different from any other programming task that we face every day. This is what I would do: // add this if you are going to assess features from the deferred actions.
project.DefaultDeferredProperties += ",ADDLOCAL,ADDFEATURES";
// your custom behaviour
project.BeforeInstall += e=>
{
if (e.IsUninstalling)
{
// do file transfer
}
else
{
if(e.Session.IsFeatureEnabled("MyFeature"))
{
// do feature specific action
}
}
};
project.AfterInstall += e=>
{
// this is your post-install deferred CA if you need to do something after the session is closed
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Oleg,
I am working on a WiX# project where I have multiple features, each with its own set of custom actions. These custom actions are further categorized into "install" and "uninstall" actions.
I need help with the following:
How can I associate custom actions with a specific feature in WiX#?
How can I ensure that the custom actions are executed during the install and uninstall processes for each feature?
I also want to execute custom action after file transfer while installing and before file remove while uninstalling.
If anyone has experience with this or can provide guidance on how to define and attach these custom actions correctly to features, I would really appreciate it.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions