cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mihaimarinescu
Level 4

unexpectedly closed the hInstall handle (type MSIHANDLE) provided to it.

Hi all,
I have a custom action which is not beeing executed. I tried to put a breakpoint in the Installscript but i never get to it. In the log file i get this :

MSI (s) (F4:64) [08:15:18:914]: NOTE: custom action InstallJungoDriver_script unexpectedly closed the hInstall handle (type MSIHANDLE) provided to it. The custom action should be fixed to not close that handle.

the installscript code is :

function InstallJungoWinDriver(hMsi)        
STRING driverPath;
STRING wregPath;
STRING wregPathCmdLine;
STRING line;
NUMBER nvResult;
begin
WriteLineToFile("InstallJungoWinDriver");

driverPath = INSTALLDIR ^ "\Driver";
wregPath = driverPath ^ "wdreg.exe";

wregPathCmdLine = "-inf windrvr6.inf -log" ^ TempFolder ^ "driver.log -silent install";

nvResult = LaunchAppAndWait(wregPath,wregPathCmdLine,LAAW_OPTION_WAIT|LAAW_OPTION_HIDDEN);

//Let's check to see what return code we get back
switch (nvResult)
case 0:
//Driver installed successful
WriteLineToFile("WinDriver installed with success");
case 1:
//Driver failed
WriteErrorMessage("WinDriver cannot be installed");
NumToStr(line,LAAW_PARAMETERS.nLaunchResult);
WriteLineToFile("ERROR CODE for launching wreg.exe: " + line);
case 2:
//We need to reboot
MsiSetProperty(hMsi,"REBOOT","Suppress");
endswitch;

WriteLineToFile("Finish running InstallJungoWinDriver.");
end;


Am i doing somthing wrong ?
btw i am on Vista and i run the custom action as a Deferred Execution in System Context

thanks
mihai
Labels (1)
0 Kudos
(1) Reply
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The log message can be ignored since it does not cause any adverse behavior.
0 Kudos