This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Custom Action Not Executing?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 08, 2009
02:23 PM
Custom Action Not Executing?
Project Type: Basic MSI
I've been trying to get this custom action to work but it just doesn't seem to execute. It is an InstallScript action immediately after InstallODBC in the Install/Execute sequence. I've set it as "Asynchronous (Waits for exit code)". The only condition is REMOVE<>"ALL". The In-Script Execution is set to "Deferred". So I would expect it to execute during a fresh install. However, the first line in the function is a MessageBox that never appears. The EXE CA immediately after this InstallScript CA works just fine (it displays a run-time progress dialog) and has the same exact setup except that it is a different type.
Any help or advice would be greatly appreciated.
I've been trying to get this custom action to work but it just doesn't seem to execute. It is an InstallScript action immediately after InstallODBC in the Install/Execute sequence. I've set it as "Asynchronous (Waits for exit code)". The only condition is REMOVE<>"ALL". The In-Script Execution is set to "Deferred". So I would expect it to execute during a fresh install. However, the first line in the function is a MessageBox that never appears. The EXE CA immediately after this InstallScript CA works just fine (it displays a run-time progress dialog) and has the same exact setup except that it is a different type.
Any help or advice would be greatly appreciated.
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 08, 2009
04:03 PM
Does a run-time log file say anything about the action (the condition failing, anything)? What is the InstallScript function's signature?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 08, 2009
06:01 PM
Actually, it looks to be running something.
This claims the return value is "1" but according to the script code the one and only location where a value of "1" could be returned is the very last statement in the function. There should be several MessageBox dialogs, a directory created and some files copied before the end of this function. Is there any way I can add a logging statement to verify where in the function the return value is coming from?
MSI (s) (98:14) [15:17:49:079]: Doing action: spsInstallHelpFiles
Action 15:17:49: spsInstallHelpFiles.
Action start 15:17:49: spsInstallHelpFiles.
spsInstallHelpFiles:
Action ended 15:17:49: spsInstallHelpFiles. Return value 1.
This claims the return value is "1" but according to the script code the one and only location where a value of "1" could be returned is the very last statement in the function. There should be several MessageBox dialogs, a directory created and some files copied before the end of this function. Is there any way I can add a logging statement to verify where in the function the return value is coming from?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 08, 2009
06:07 PM
Please see the MSI help topic "Logging of Action Return Values" (logged values are different from the "real" return values), and perhaps see this old newsletter tip (PDF warning) for information about SprintfMsiLog and other techniques: http://www.acresso.com/webdocuments/PDF/msi_writing_to_the_log_file.pdf.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 08, 2009
07:22 PM
I added a couple SprintfMsiLog() calls to the function. The very first line of the function is one of them. The MSI log shows the exact same output as before. It appears the function is not actually executing.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 08, 2009
07:33 PM
Sanity check: the prototype and declarations are:
export prototype FunctionName(HWND);...?
function FunctionName(hInstall)
// vars.
begin
// etc.
return ERROR_SUCCESS;
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 11, 2009
11:19 AM
RobertDickau wrote:
Sanity check: the prototype and declarations are:export prototype FunctionName(HWND);
function FunctionName(hInstall)
end;
This appears to have been the problem. I did not have an HWND parameter on this function. I will endeavour to remember that custom InstallScript actions need to have this defined. Now I just need to figure out why the action fails to work properly now that's successfully invoked! 🙂
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)