cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
alan93
Level 3

Cannot get Custom Action to execute.

I did the custome action to try to get an InstallScript function to delete a directory.
I used the DeleteDir function example in the help but cannot get this to run during install.

I put a message box in it and it doesn't show either.

So I put message box in MyFunction(hMSI) and it didn't run either. What is going on with this?

I have
Function name : MyFunction.
Type: Run INstallScript Code
Source: MyFunction
Synchronous (Check exit code)
In-Script Execution: Immediate Execution
Execution Scheduling: Always Execute
Install UI Sequence:
Install Execute Sequence:

Setting wrong? or missing something?
Labels (1)
0 Kudos
(5) Replies
hidenori
Level 17

You need to sequence the action in either the Install UI Sequence or Install Execute Sequence. The both settings are currently set to "".
0 Kudos
alan93
Level 3

hidenori wrote:
You need to sequence the action in either the Install UI Sequence or Install Execute Sequence. The both settings are currently set to "".


I have no idea what each of these choices and selections are but
I selected these to:

After InstalWelcome
After InstallInitialize
After Install Initialize
After SEtupInitialization
After INstallInitialze

and still, no message box. Can anbody give an example of how to show a message box in a custom action??

I would think this is very basic to do but the Custom Actions wizzard seems way too complicated.
0 Kudos
alan93
Level 3

How do you Custom action this??

function MyFunction(hMSI)
// To Do: Declare local variables.
begin
MessageBox("test", INFORMATION);
// To Do: Write script that will be executed when MyFunction is called.

end;
0 Kudos
hidenori
Level 17

Try sequencing "After CostFinalize" in the Install UI Sequence and see if the message box is poped up.
0 Kudos
alan93
Level 3

I finally got it with After SetupInitialization.
thanks.
0 Kudos