cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Luis_Roux
Level 3

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

Hi All:

I have an Installshield 2008 Basic MSI Project. On Vista 32 and Vista 64, all my installscript custom actions are not beeing executed. Every time I call a custom action I get this in the log file:

WINDOWS VISTA 32

MSI (s) (3C:04) [19:41:01:880]: Doing action: MyISCustomAction
Action 19:41:01: MyISCustomAction.
Action start 19:41:01: MyISCustomAction.
MSI (s) (3C:0C) [19:41:01:908]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI8349.tmp, Entrypoint: f2
MSI (s) (3C:0C) [19:41:01:908]: Generating random cookie.
MSI (s) (3C:0C) [19:41:01:919]: Created Custom Action Server with PID 2696 (0xA88).
MSI (s) (3C:2C) [19:41:02:179]: Running as a service.
MSI (s) (3C:2C) [19:41:02:181]: Hello, I'm your 32bit Impersonated custom action server.
InstallShield 19:41:02: Running InstallScript function f2
InstallShield 19:41:02: Using temp folder C:\Users\ADMINI~1\AppData\Local\Temp\{3ED55655-AFD1-481E-BFE8-1049781AE064}
InstallShield 19:41:02: Installing engine...
InstallShield 19:41:02: Using product language 1033
InstallShield 19:41:02: Extracting support file setup.inx to C:\Users\ADMINI~1\AppData\Local\Temp\{3ED55655-AFD1-481E-BFE8-1049781AE064}\setup.inx
InstallShield 19:41:02: Opening stream of file C:\Windows\Installer\MSI8349.tmp
InstallShield 19:41:03: Extracting support file ISRT.dll to C:\Users\ADMINI~1\AppData\Local\Temp\{3ED55655-AFD1-481E-BFE8-1049781AE064}\ISRT.dll
InstallShield 19:41:03: Extracting support file IsConfig.ini to C:\Users\ADMINI~1\AppData\Local\Temp\{3ED55655-AFD1-481E-BFE8-1049781AE064}\IsConfig.ini
InstallShield 19:41:03: Extracting support file _isres1033.dll to C:\Users\ADMINI~1\AppData\Local\Temp\{3ED55655-AFD1-481E-BFE8-1049781AE064}\_isres.dll
InstallShield 19:41:03: Extracting support file String1033.txt to C:\Users\ADMINI~1\AppData\Local\Temp\{3ED55655-AFD1-481E-BFE8-1049781AE064}\String1033.txt
InstallShield 19:41:03: Skipping optional support file _isuser1033.dll
InstallShield 19:41:03: Setting script cmdline...
InstallShield 19:41:03: ProductCode is {BCEF3D04-968C-45E3-B42E-5247EF4A699D}
InstallShield 19:41:03: Initializing Engine
InstallShield 19:41:04: Done Initializing...
InstallShield 19:41:04: Registering Msi Server...
MSI (s) (3C!C4) [19:41:04:040]: Note: 1: 2732 2: 0
MSI (s) (3C!C4) [19:41:04:042]: Note: 1: 2732 2: 0
MSI (s) (3C!C4) [19:41:04:044]: Note: 1: 2732 2: 0
InstallShield 19:41:10: Invoking script function MyISCustomAction
InstallShield 19:41:10: CallScriptFunctionFromMsiCA() ends
MSI (s) (3C:0C) [19:41:10:053]: NOTE: custom action MyISCustomAction unexpectedly closed the hInstall handle (type MSIHANDLE) provided to it. The custom action should be fixed to not close that handle.
Action ended 19:41:10: MyISCustomAction. Return value 1.


WINDOWS VISTA 64

MSI (c) (60:C4) [12:11:02:711]: Doing action: MyISCustomAction
Action 12:11:02: MyISCustomAction.
Action start 12:11:02: MyISCustomAction.
MSI (c) (60:BC) [12:11:02:727]: Invoking remote custom action. DLL: C:\Users\ADMINI~1\AppData\Local\Temp\MSI40E3.tmp, Entrypoint: f1
InstallShield 12:11:02: Running InstallScript function f1
InstallShield 12:11:02: Using temp folder C:\Users\ADMINI~1\AppData\Local\Temp\{DFB6BC5F-8EAE-4E74-ABD3-0F812E707C7D}
InstallShield 12:11:02: Installing engine...
InstallShield 12:11:02: Using product language 1033
InstallShield 12:11:02: Extracting support file setup.inx to C:\Users\ADMINI~1\AppData\Local\Temp\{DFB6BC5F-8EAE-4E74-ABD3-0F812E707C7D}\setup.inx
InstallShield 12:11:02: Opening stream of file C:\Users\ADMINI~1\AppData\Local\Temp\MSI40E3.tmp
InstallShield 12:11:03: Extracting support file ISRT.dll to C:\Users\ADMINI~1\AppData\Local\Temp\{DFB6BC5F-8EAE-4E74-ABD3-0F812E707C7D}\ISRT.dll
InstallShield 12:11:03: Extracting support file IsConfig.ini to C:\Users\ADMINI~1\AppData\Local\Temp\{DFB6BC5F-8EAE-4E74-ABD3-0F812E707C7D}\IsConfig.ini
InstallShield 12:11:03: Extracting support file _isres1033.dll to C:\Users\ADMINI~1\AppData\Local\Temp\{DFB6BC5F-8EAE-4E74-ABD3-0F812E707C7D}\_isres.dll
InstallShield 12:11:03: Extracting support file String1033.txt to C:\Users\ADMINI~1\AppData\Local\Temp\{DFB6BC5F-8EAE-4E74-ABD3-0F812E707C7D}\String1033.txt
InstallShield 12:11:03: Skipping optional support file _isuser1033.dll
InstallShield 12:11:03: Detected X64 OS
InstallShield 12:11:03: Extracting support file ISBEWX64.exe to C:\Users\ADMINI~1\AppData\Local\Temp\{DFB6BC5F-8EAE-4E74-ABD3-0F812E707C7D}\ISBEW64.exe
InstallShield 12:11:03: Setting script cmdline...
InstallShield 12:11:03: ProductCode is {BCEF3D04-968C-45E3-B42E-5247EF4A699D}
InstallShield 12:11:03: Initializing Engine
InstallShield 12:11:03: Script function f1 failure. Unknown Exception.
MSI (c) (60:BC) [12:11:03:881]: NOTE: custom action MyISCustomAction unexpectedly closed the hInstall handle (type MSIHANDLE) provided to it. The custom action should be fixed to not close that handle.
Action ended 12:11:03: MyISCustomAction. Return value 1.


WINDOWS XPSP2

MSI (c) (2C:28) [19:24:47:446]: Doing action: MyISCustomAction
Action 19:24:47: MyISCustomAction.
Action start 19:24:47: MyISCustomAction.
MSI (c) (2C:5C) [19:24:47:486]: Invoking remote custom action. DLL: C:\DOCUME~1\LUISRO~1\LOCALS~1\Temp\MSIBD6.tmp, Entrypoint: f1
InstallShield 19:24:48: Running InstallScript function f1
InstallShield 19:24:48: Using temp folder C:\DOCUME~1\LUISRO~1\LOCALS~1\Temp\{28297966-0821-4D4F-B65F-8D39A3710E87}
InstallShield 19:24:48: Installing engine...
InstallShield 19:24:48: Using product language 1033
InstallShield 19:24:48: Extracting support file setup.inx to C:\DOCUME~1\LUISRO~1\LOCALS~1\Temp\{28297966-0821-4D4F-B65F-8D39A3710E87}\setup.inx
InstallShield 19:24:48: Opening stream of file C:\DOCUME~1\LUISRO~1\LOCALS~1\Temp\MSIBD6.tmp
InstallShield 19:24:49: Extracting support file ISRT.dll to C:\DOCUME~1\LUISRO~1\LOCALS~1\Temp\{28297966-0821-4D4F-B65F-8D39A3710E87}\ISRT.dll
InstallShield 19:24:49: Extracting support file IsConfig.ini to C:\DOCUME~1\LUISRO~1\LOCALS~1\Temp\{28297966-0821-4D4F-B65F-8D39A3710E87}\IsConfig.ini
InstallShield 19:24:49: Extracting support file _isres1033.dll to C:\DOCUME~1\LUISRO~1\LOCALS~1\Temp\{28297966-0821-4D4F-B65F-8D39A3710E87}\_isres.dll
InstallShield 19:24:49: Extracting support file String1033.txt to C:\DOCUME~1\LUISRO~1\LOCALS~1\Temp\{28297966-0821-4D4F-B65F-8D39A3710E87}\String1033.txt
InstallShield 19:24:49: Skipping optional support file _isuser1033.dll
InstallShield 19:24:49: Setting script cmdline...
InstallShield 19:24:49: ProductCode is {BCEF3D04-968C-45E3-B42E-5247EF4A699D}
InstallShield 19:24:49: Initializing Engine
InstallShield 19:24:50: Done Initializing...
InstallShield 19:24:50: Registering Msi Server...
MSI (c) (2C!C4) [19:24:50:361]: Note: 1: 2732 2: 0
InstallShield 19:24:50: Invoking script function MyISCustomAction
MSI (c) (2C!C4) [19:24:50:381]: PROPERTY CHANGE: Adding MYPROPERTY property. Its value is 'C:\Program Files\BITAM'.
InstallShield 19:24:50: CallScriptFunctionFromMsiCA() ends
Action ended 19:24:50: MyISCustomAction. Return value 1.

On Windows XP SP2 and Windows 2003 they run Ok. It doesn't matter what is the source of the custom action because even a simple MsgBox fails. All the vista machines I have tried are Dual Core or Quad Core. I have not tried on single core.

I found the following KB document, and it sounds like the same problem, but the hotfix is for IS 12 not for IS 2008.

http://kb.acresso.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=Q112500&sliceId=

Any ideas,

Thank you,

Luis Roux
Labels (1)
0 Kudos
(1) Reply
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The custom action closing the install handle actually occurs on all platforms, however, a message about this is only logged on MSI 4.0 and newer (Vista/2008 Server). The handle being closed by the custom action does not actually cause any adverse behavior. In addition, this occurs after your script code would have run.

Unfortunately, I'm not sure why you are seeing this behavior. The issues related to the KB article you referenced have pretty much been ironed out since IS 12 SP1. Typically this behavior would occur if an exception occurs in the script execution or internally in the InstallScript engine as a result of something the script did. Can you attach a sample project that reproduces this issue with a simple InstallScript custom action (preferably including the built MSI)? Also, if you wrap any script code in your custom action function in a try/catch/endcatch, does the "Script function f1 failure. Unknown Exception." log line go away on Vista x64 machines?
0 Kudos