ZedZip
ZedZip

Reputation: 6462

WiX: How to get if this is "Installed" state in c# custom action function?

I have a custom action c# function which need to know inside what is the state "Installed" or "NOT Installed". How to get this state?

I.e. I need to know this state (Installed OR NOT Installed) in c# custom action

<Custom Action="CA_myfun" After="PublishProduct">NOT Installed</Custom>
    </InstallExecuteSequence>

Upvotes: 1

Views: 935

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55581

Assuming the custom action is scheduled for immediate execution:

bool installed = session.EvalulateCondition("Installed");

Upvotes: 3

Related Questions