Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3440616
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:27:11+00:00 2026-05-18T08:27:11+00:00

We have a custom action that we want to run ONLY on a major

  • 0

We have a custom action that we want to run ONLY on a major upgrade. Trouble is, the CA is deferred because it needs access to system files (it removes the old version of the program from an INI file). Because the CA is deferred, it only has access to the CustomActionData property.

So my first attempt was to set CustomActionData if UPGRADINGPRODUCTCODE was true, and then condition the CA that actually did the upgrade on CustomActionData. That failed–CustomActionData was not set, I assume because it’s only visible within the custom action and not usable as a condition for the custom action.

Here are the CA’s I defined:

  <CustomAction Id="MyCA.SetProperty" Return="check" Property="MyCA"
    Value="[UPGRADINGPRODUCTCODE]" />

  <CustomAction
      Id="MyCA"
      BinaryKey="MyIniProcessingProgram"
      ExeCommand="MyArgs"
      Execute="deferred"
      Impersonate="no"
  Return="ignore"/>

And here is my InstallExecuteSequence:

<RemoveExistingProducts After="InstallValidate" />
<Custom Action="MyCA.SetProperty" Before="InstallFinalize"/>
<Custom Action="MyCA" After="MyCA.SetProperty">
    CustomActionData
</Custom>

I have also tried:

  • Making MyCA.SetProperty conditional on UPGRADINGPRODUCTCODE, then scheduling MyCA after it–doesn’t work because even if MyCA.SetProperty doesn’t run, the “After” action does.

It would be best if we could avoid JavaScript/VBScript actions, or resort to checking the value of CustomActionData within the INI-updating program itself; the idea is to make the CA itself conditional, so we don’t launch it unless the condition (major upgrade) is true.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:27:12+00:00Added an answer on May 18, 2026 at 8:27 am

    Why not use this custom action:

    <CustomAction
          Id="MyCA"
          BinaryKey="MyIniProcessingProgram"
          ExeCommand="MyArgs"
          Execute="deferred"
          Impersonate="no"
    Return="ignore"/>
    

    with this InstallExecuteSequence?

    <Custom Action="MyCA" After="InstallValidate">
          UPGRADINGPRODUCTCODE
    </Custom>
    

    Please note that UPGRADINGPRODUCTCODE is set in the package which is being upgraded, so it’s available only in the uninstall process of the old version.

    If you want to detect an upgrade in your new version, you can use the ActionProperty column in Upgrade table:
    http://msdn.microsoft.com/en-us/library/aa372379(VS.85).aspx

    Basically, you need to define the upgrade rules for older and newer versions:
    http://wix.sourceforge.net/manual-wix2/wix_xsd_upgradeversion.htm

    This way you can detect older versions through a custom property. This property can then be used to condition your custom action.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok I have events that I want to publish/unpublish with an extra action (nonRESTful)
I have a setup project in which I have a custom action that is
I have a custom bar button item that I want to nudge down 5
I have a custom action that runs in the very beginning of my Install
I have a controller action that I want to update via a jquery call.
I have a custom Action Helper that is working fine. It's generating a dynamic
In WIX project I have an custom action that works on SQL server with
I have one custom action (add) and two custom objects (favorites list) and (tv
I have a custom controller action as listed below. I have a form with
I have added a custom action to the CustomList type. For testing purposes I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.