PDA

View Full Version : Installscript custom action aborts setup



USchumacher
11-09-2011, 06:54 AM
Hi all,

i have an installscript function like

export prototype NUMBER Sample();
function Sample()
begin

// do something
return 0;

end;

Now i have created a custom action to call my function with:
Synchronous (Check exit code)
Immediate execution
Always execute

I placed my custom action in Sequences > Installation > Execute after "CostFinalize".

The effect is that my setup aborts. What was wrong?

Thanks a lot
Ulrich

hidenori
11-09-2011, 03:22 PM
I think the function signature for InstallScript custom actions needs to be as follows:

export prototype NUMBER Sample(HWND);
function Sample(hMsi)
begin

// do something
return 0;

end;

USchumacher
11-10-2011, 06:14 AM
This works. Thanks a lot!

I am not sure but i think setup.rul needs the include of the custom actions code like
#include "CustomActions.rul"
too.

rrinblue22
11-13-2011, 01:10 PM
#include "CustomActions.rul" is not needed as the custom action setting's drop down will simply list the function which is exported in your setup.rul..........