
dilipxsl1.5524903596860105E12 asked a question.
Very simple CA returning error code 3
I have a very simple custom action (that calls an InstallScript function) that is practically driving me nuts by returning error code 3 (as noted in the MSI logs) and rolling back the entire installation.
Here is the function:
export prototype EnableIIS();
function EnableIIS()
begin
if (SYSINFO.WINNT.bWinNT) then
LaunchApplication(WINSYSDIR ^ "sc.exe", "config W3SVC start= auto", "", SW_HIDE, INFINITE,
LAAW_OPTION_WAIT | LAAW_OPTION_SHOW_HOURGLASS | LAAW_OPTION_HIDDEN);
endif;
end;
As you can see all I am doing is enabling IIS if the installation is running under Windows XP and family. Please note that this is actually failing on Vista! which makes the problem even more weirder. (I haven't checked this on XP yet)
I have a custom action setup to call this function like so:
Return Processing: Synchronous (check exit code)
In-Script execution: Immediate Execution
Execution Scheduling: Execute only once
Install Exec Sequence: After InstallValidate
Install Exec Condition: REMOVE<>"ALL"
MSI type number: 65792
The log notes that my custom action returned 3 (which apparently is failure) and the installation aborts.
What am i doing wrong?
I just figured out the code wasn't getting called because I was missing a goshdarned HWND as a parameter to the function in its declaration? Jeez!!!! I can't believe I wasted 2 hours tracking this down :-(