Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 9

Custom Action Message

I have a custom action that checks if a user provided folder is valid, and if it is not then displays and logs a message to that affect. This custom action is called using a DoAction event on the Next button of a dialog, and as part of the execute sequence in case the user ran the install silently.

My question is, how do I get the CA to display a message to the user when called from the dialog, but not when called from the execute sequence? I stil lwant to log from the execute sequence.
Labels (1)
0 Kudos
(5) Replies
Level 10

What kind of CA is it?
How about utilize the 'UILevel' property?
0 Kudos
Level 9

What are the rules for showing messages at different UILevels? Basically, what types of messages can be shown for the different levels? Obviously, level 5 shows them all, and level 2 will only log them. But what about levels 2 and 4; Do you show any error messages there?
0 Kudos
Level 12 Flexeran
Level 12 Flexeran

Where in the execute sequence do you use this? If it's deferred, commit, or rollback, you can probably use MsiGetMode to identify that scenario. Other than that, unless I'm missing something, your best bet may be create multiple entry points and use multiple custom actions.
0 Kudos
Level 3

Hi Eric,
I read your post and I would like to duplicate what you have done.

I need a custom action (installscript function) to run once the user has clicked the next button in the customer information dialog.

I have created the installscript function (Validate_CD_Key), see below.
I have created the corresponding custom action (Validate_CD_Key).
In the events of the NEXT button, I have selected DO ACTION and
selected Validate_CD_Key.

I have selected a RETURN PROCESSING value of SYNCHRONOUS (ignore exit code).
I have selected an In-Script Execution value of Immediately Execute.
I have selected an Execution Scheduling value of Always Execute.
I am not sure what to put for Install UI Sequence and Install Execute Sequence. Currently they are absent from sequence.

I would greatly appreciate any help.
0 Kudos
Level 9

For me, the InstallUI sequence was covered by the Next button DoAction event that called the CA. I would imagine this would be the case for you as well, provided the dialog will always be presented to the user.

I then added somewhere in the execute sequence to be called in case the user ran the install silently. The only thing I would change on yuor end is to change the CA from Always Run to Run Once. This will prevent the CA from running again during the execute sequence if it were called fromthe UI. BTW, Run Once has no effect on DoAction events, so the CA will run everytime the user clicks that next button, but will not run again after that.
0 Kudos