cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
anilkumar_mca
Level 8

Unable to run custom action

Hi,
I am newly developing an Basic MSI project, i am unable to execute custom action scripts....steps i performed on a sample project
1. Opened a new project(Basic MSI)
2. Created a new custom action with just a 'MessageBox'
3. Assigned that custom action to a dialog box. u can see the settings below:
pls suggest me what to do?
Labels (1)
0 Kudos
(11) Replies
vgorantla
Level 3

You have to right click on event "DoAction" and move it up. It has to be before "NewDialog" event for your custom action to run.
0 Kudos
anilkumar_mca
Level 8

Hi vgorantla,

Thanks for your replay, it should work with your replay...... but still i am facing the same issue.:(

fyi....
without executing the script(and next dialog screens), installer is showing "The installer was interupted before ............"
0 Kudos
vgorantla
Level 3

In your custom action properties change the ReturnProcessing value from Synchronous (Check Exit Code) to Synchronous (Ignores Exit Code) and see if it helps.
0 Kudos
anilkumar_mca
Level 8

Hi vgorantla,

Thank you once again. Now my installer is showing next dialogs but its not executing the script.... i put a MessageBox in the script, but installer is not showing that...
Is anyother option i have to change?
0 Kudos
anilkumar_mca
Level 8

Hi vgorantla,

Can you replay to my question? im waiting for your replay 😞



it takes seconds to replay,
it save days to complete my work...
0 Kudos
vgorantla
Level 3

Send me your setup.rul file to my email address vgorantla@gmail.com and I may be able to help.
0 Kudos
RobertDickau
Flexera Alumni

Perhaps post the custom action code?
0 Kudos
anilkumar_mca
Level 8

Hi,
sorry for the late replay, my script is having only two lines of code... but i am unable to execute it(in debug mode also)

my function:
function copyFiles()
begin
MessageBox("in files copy",INFORMATION);
CopyFile(SRCDIR^"GlobalAssemblyCache\\GAC_FW\\*.*", INSTALLDIR ^ "\\2.0.0\\Bin*.*");
CopyFile(SRCDIR^"GlobalAssemblyCache\\GAC_MI\\*.*", INSTALLDIR ^ "5.0.0\\Bin\\*.*");
end;


even the messagebox also not displayed.........

i am calling this function after 'InstallFiles' action....
0 Kudos
anilkumar_mca
Level 8

Hi,
I observed that ISSetup.dll is not getting created....... is this is the reason for not executing Custom Actions?
0 Kudos
anilkumar_mca
Level 8

Hi,

any update on this issue pls........

Is anyone faced any issues regarding CustomAction?

fyi...
the settings that i given to my CA's are shown in below:
0 Kudos
Not applicable

Your custom action is targeting a function named "MyFunction" exported from your InstallScript code. Do you have a function named "MyFunction" in your InstallScript code, is it exported with the export keyword, and does it have 1 parameter of type HWND?

The InstallScript Code you posted doesn't comply with the requirements necessary to launch an InstallScript custom action. It should look more similar to:

export prototype MyFunction(HWND);

function MyFunction(hMSI)
begin
// insert code here
end;

[[ not tested to compile, but is the general idea ]]

You may also find more helpful information in various help articles related to InstallScript and InstallScript Custom Actions. Searching for either term at support.installshield.com should provide useful results.
0 Kudos