Hi all,

I'm having trouble getting a custom action to run during a minor upgrade. I made a change to an msi to fix an issue we were having and in the transform there were 3 Custom Actions which are run during a normal install. These had a Condition set to "NOT Installed" and ran fine during a normal install. However, when I come to deploying the fix as a minor upgrade using the command line msiexec /i {PRODUCT} REINSTALL="ALL" REINSTALLMODE="vomus" the Custom ACtions aren't running. I changed the Condition on the Custom Actions to NOT REMOVE but it doesn't seem to be working. I have tried a few different conditions and also leaving the conditions blank but each time the log file is telling me that the Condition is False. Does anyone know what Condition I should be setting for these Custom Actions to run during a minor upgrade? Thanks in advance!

2 Comments   [ + ] Show Comments

Comments

  • Hello,
    Could you try msiexec /i {Product} ADDLOCAL=ALL (this is select all features) ; And use the condition Not REMOVE="ALL" (all time , without REMOVE state)
  • Tip: Use the debugger of your Msi packaging tool to show you were it is not going as planned! :)
Please log in to comment

Answers

1

We mostly deal with Install and Uninstall as packagers, but conditions based on Minor Upgrade would definitely be different..

I found this link http://zacky.cleverits.com/IT/MSI/msi_conditions.htm and it would appear that the condition that you want to be true is "Installed" or "REINSTALL" or "IS_MINOR_UPGRADE"

Answered 08/16/2013 by: ekgcorp
Tenth Degree Black Belt

Please log in to comment
1

Hummm. 

Alright. First try the CA's with no condition, this will mean it will run on all events. Check the logs to see it has done its work (whatever it supposed to do). If they logs says it has run (the action was TRUE), yay - now check that it has done the job, so if it was to rename a file on the system, check that if renamed the file.

If you find the logs says the CA has run, but it hasnt actioned the change it could be a rights issue. At this point look at the CA. How is the action being preformed? Is it actioned under 

  • Immediate Execution
  • Deferred Execution
If its under Immediate Execution, you might want to try Deferred Execution, as this will give you greater rights over the system.
 
There are some "got ya's" with the above. One thing to check is where you are sequencingthe CA. 
 
 
No point reinventing the wheel, also I cant be arsed typing anymore. 
Answered 08/17/2013 by: rileyz
Red Belt

  • PS. Don't bother with minor upgrades, they make your life a misery, always go for a full upgrade. Change the prod code, package code and version. Not standard, but it does make life a lot easier. (you cant do this if its a vendor install which sucks).

    Also saw you tried with blank conditions. This should of worked, did you remember to change the package code, and increment the version number? Silly question to ask, but I thought I would check.
Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share