I used to play around with installshield and loved the way installshield ability to load and call my DLL during installation process. I tried to implement the same scenario with advanced installer and see if this product also has the same capabilities.
I've browsed and searched this forum and googling about the dll load, but so few of them explaining how to successfully load and call the DLL from within the installer.
I've problem with call dll , because the log showed me error about can not find specified module.
For information, I've put my DLL in temporary folder and my DLL depends on some other DLL that I already put in the same temporary folder.
But, no matter what I do , the process of calling the DLL always failed , here is a piece of my log :
=========================================================
...
...
...
...
ction 10:26:44: AI_ExtractTempFiles.
Action start 10:26:44: AI_ExtractTempFiles.
MSI (c) (D4:C8) [10:26:44:640]: Invoking remote custom action. DLL: C:\Users\wisnu\AppData\Local\Temp\MSIE594.tmp, Entrypoint: ExtractTempFiles
MSI (c) (D4!AC) [10:26:44:697]: PROPERTY CHANGE: Adding AITEMPFILESEXTRACTED property. Its value is 'YES'.
MSI (c) (D4!AC) [10:26:44:737]: PROPERTY CHANGE: Adding AI_COMPANION.DLL property. Its value is 'C:\Users\wisnu\AppData\Local\Temp\companion.dll'.
MSI (c) (D4!AC) [10:26:44:786]: PROPERTY CHANGE: Adding AI_COMPHLPR.DLL property. Its value is 'C:\Users\wisnu\AppData\Local\Temp\comphlpr.dll'.
MSI (c) (D4!AC) [10:26:44:825]: PROPERTY CHANGE: Adding AI_SYST_MDI.DLL property. Its value is 'C:\Users\wisnu\AppData\Local\Temp\syst_mdi.dll'.
MSI (c) (D4!AC) [10:26:44:872]: PROPERTY CHANGE: Adding AI_LMGR_HLPRIS.DLL property. Its value is 'C:\Users\wisnu\AppData\Local\Temp\lmgr_hlpris.dll'.
MSI (c) (D4!AC) [10:26:44:913]: PROPERTY CHANGE: Adding AI_LOGSDK.DLL property. Its value is 'C:\Users\wisnu\AppData\Local\Temp\logsdk.dll'.
MSI (c) (D4!AC) [10:26:44:948]: PROPERTY CHANGE: Adding AI_TEMP_FILE_ROLLBACK_INFO property. Its value is 'C:\USERS\WISNU\APPDATA\LOCAL\TEMP\COMPANION.DLL|C:\USERS\WISNU\APPDATA\LOCAL\TEMP\|C:\USERS\WISNU\APPDATA\LOCAL\TEMP\COMPHLPR.DLL|C:\USERS\WISNU\APPDATA\LOCAL\TEMP\SYST_MDI.DLL|C:\USERS\WISNU\APPDATA\LOCAL\TEMP\LMGR_HLPRIS.DLL|C:\USERS\WISNU\APPDATA\LOCAL\TEMP\LOGSDK.DLL'.
Action ended 10:26:44: AI_ExtractTempFiles. Return value 1.
MSI (c) (D4:A8) [10:26:45:003]: Doing action: MigrateFeatureStates
Action 10:26:45: MigrateFeatureStates. Migrating feature states from related applications
Action start 10:26:45: MigrateFeatureStates.
Action ended 10:26:45: MigrateFeatureStates. Return value 0.
MSI (c) (D4:A8) [10:26:45:092]: Doing action: WelcomeDlg
Action 10:26:45: WelcomeDlg.
Action start 10:26:45: WelcomeDlg.
MSI (c) (D4:A0) [10:26:47:656]: PROPERTY CHANGE: Modifying USER_INFO_PROP property. Its current value is ' '. Its new value: ' C'.
Action ended 10:26:48: WelcomeDlg. Return value 1.
MSI (c) (D4:A8) [10:26:48:870]: Doing action: AI_DATA_SETTER_5
Action 10:26:48: AI_DATA_SETTER_5.
Action start 10:26:48: AI_DATA_SETTER_5.
MSI (c) (D4:A8) [10:26:48:936]: PROPERTY CHANGE: Adding CustomActionData property. Its value is 'C:\Users\wisnu\AppData\Local\Temp\lmgr_hlpris.dll?I;RES_VERIFY_MY_DATA;C;verifyMyData;S;S;P;USER_INFO_PROP?'.
Action ended 10:26:48: AI_DATA_SETTER_5. Return value 1.
MSI (c) (D4:A8) [10:26:48:980]: Doing action: UserInfoDlg
Action 10:26:49: UserInfoDlg.
Action start 10:26:49: UserInfoDlg.
Action ended 10:26:49: UserInfoDlg. Return value 1.
MSI (c) (D4:A8) [10:26:49:081]: Doing action: LMGR_HLPRIS_VERIFY_MY_DATA
Action 10:26:49: LMGR_HLPRIS_VERIFY_MY_DATA.
Action start 10:26:49: LMGR_HLPRIS_VERIFY_MY_DATA.
MSI (c) (D4:C0) [10:26:49:170]: Invoking remote custom action. DLL: C:\Users\wisnu\AppData\Local\Temp\MSIF741.tmp, Entrypoint: CallStdFcn
Error 4157. Failed to load C:\Users\wisnu\AppData\Local\Temp\lmgr_hlpris.dll. Error:The specified module could not be found.
MSI (c) (D4!E4) [10:26:50:325]: Product: Aegis LS Manager -- Error 4157. Failed to load C:\Users\wisnu\AppData\Local\Temp\lmgr_hlpris.dll. Error:The specified module could not be found.
CustomAction LMGR_HLPRIS_VERIFY_MY_DATA returned actual error code 1603 but will be translated to success due to continue marking
Action ended 10:26:50: LMGR_HLPRIS_VERIFY_MY_DATA. Return value 1.
MSI (c) (D4:A8) [10:26:50:403]: Doing action: UserInfoDlg
Action 10:26:50: UserInfoDlg.
Action start 10:26:50: UserInfoDlg.
...
...
=========================================================
First, I tought it was because of the dependency to another DLL, but no matter what I did to the DLL source (simple single call without dependency, C call, Standard call), all of them failed in advanced installer.
I also had tried the verbose log using the msiexec command and it showed me the same error about can not find a specific module.
Are there any special requirement to load a custom DLL into the installer ?
Why is it so difficult for advanced installer to call custom DLL, while the installshield can do it easily ?
Thank you.
FOLLOW US
Get the latest news in Application Packaging