cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Infy101
Level 2

Basic MSI + InstallScript CA = not working

Hello,

I've recently moved from IS12 to IS2010 SP1. So I created a new blank Basic MSI project with a simple IS CA:

function SetInstallDir(hMSI)    
STRING oldDir1;
NUMBER nvSize;
begin
nvSize = 2048;
MsiGetProperty (hMSI, "OLD_INSTALL_DIR", oldDir1, nvSize);
if StrLengthChars(oldDir1) > 0 then
MsiSetProperty (hMSI, "INSTALLDIR", oldDir1);
endif;
end;


It is scheduled in UI Sequence after AppSearch with synchronous immediate execution.

Testing on my own WinXP machine the Basic MSI project works fine along with the CA.

However running on an older Win2k machine the CA fails:

[CODE]Action ended 10:42:01: AppSearch. Return value 1.
MSI (c) (34:44) [10:42:01:593]: Doing action: SetInstallDir
Action 10:42:01: SetInstallDir.
Action start 10:42:01: SetInstallDir.
MSI (c) (34:F4) [10:42:01:625]: Invoking remote custom action. DLL: C:\DOCUME~1\ADMINI~1.ORG\LOCALS~1\Temp\MSI94.tmp, Entrypoint: f2
InstallShield 10:42:02: Running InstallScript function f2
InstallShield 10:42:02: Opening stream of file C:\DOCUME~1\ADMINI~1.ORG\LOCALS~1\Temp\MSI94.tmp
InstallShield 10:42:02: Extracting support file IsConfig.ini to C:\DOCUME~1\ADMINI~1.ORG\LOCALS~1\Temp\{9CF7E1DF-BC73-4CD3-901D-5FFB82423E80}\IsConfig.ini
InstallShield 10:42:02: Extracted isconfig.ini to C:\DOCUME~1\ADMINI~1.ORG\LOCALS~1\Temp\{9CF7E1DF-BC73-4CD3-901D-5FFB82423E80}\IsConfig.ini
InstallShield 10:42:02: Got '{D258B9B7-2EBC-4492-9CBC-CD6E719034F6}' for TempPathGuid from isconfig.ini
InstallShield 10:42:02: Attempting to use temp path 'C:\DOCUME~1\ADMINI~1.ORG\LOCALS~1\Temp\{D258B9B7-2EBC-4492-9CBC-CD6E719034F6}'
InstallShield 10:42:02: Using new temp path
InstallShield 10:42:02: Cleaning up temp file C:\DOCUME~1\ADMINI~1.ORG\LOCALS~1\Temp\{9CF7E1DF-BC73-4CD3-901D-5FFB82423E80}\IsConfig.ini
InstallShield 10:42:02: Using temp folder C:\DOCUME~1\ADMINI~1.ORG\LOCALS~1\Temp\{D258B9B7-2EBC-4492-9CBC-CD6E719034F6}
InstallShield 10:42:02: Installing engine...
InstallShield 10:42:02: Using product language 1033
InstallShield 10:42:02: Skipping optional support file _isuser_0x0409.dll
InstallShield 10:42:02: Setting script cmdline...
InstallShield 10:42:02: Using ISSCRIPTCMDLINE: /d
InstallShield 10:42:02: ProductCode is {30629CD8-0582-4DA3-9BE2-0F75B2962EB0}
InstallShield 10:42:02: Initializing Engine
InstallShield 10:42:02: Failed to Invoke __ISRTInit, error is 0x80020009
InstallShield 10:42:02: InitScript operation failed, error is 0x80020009
InstallShield 10:42:02: Failed to invoke __ISRTUninit, error is 0x80020009
InstallShield 10:42:02: Initialize() Failure, Failed to Initialize script support, Error = 0x80020009
Action ended 10:42:02: SetInstallDir. Return value 1.
MSI (c) (34:44) [10:42:02:515]: Doing action: LaunchConditions[/CODE]

Same peace of log when installing under WinXP:
[CODE]MSI (c) (A4:3C) [10:31:39:781]: Doing action: AppSearch
Action 10:31:39: AppSearch. Searching for installed applications
Action start 10:31:39: AppSearch.
AppSearch: Property: OLD_INSTALL_DIR, Signature: NewSignature1
MSI (c) (A4:3C) [10:31:39:781]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (c) (A4:3C) [10:31:39:781]: PROPERTY CHANGE: Adding OLD_INSTALL_DIR property. Its value is 'D:\Firstbeat Uploader\'.
Action ended 10:31:39: AppSearch. Return value 1.
MSI (c) (A4:3C) [10:31:39:781]: Doing action: SetInstallDir
Action 10:31:39: SetInstallDir.
Action start 10:31:39: SetInstallDir.
MSI (c) (A4:F0) [10:31:39:781]: Invoking remote custom action. DLL: C:\DOCUME~1\User\LOCALS~1\Temp\MSI2A2.tmp, Entrypoint: f2
InstallShield 10:31:39: Running InstallScript function f2
InstallShield 10:31:39: Opening stream of file C:\DOCUME~1\User\LOCALS~1\Temp\MSI2A2.tmp
InstallShield 10:31:39: Extracting support file IsConfig.ini to C:\DOCUME~1\User\LOCALS~1\Temp\{5BCDE143-1155-42F1-96B0-BA6CEDDE4BCE}\IsConfig.ini
InstallShield 10:31:40: Extracted isconfig.ini to C:\DOCUME~1\User\LOCALS~1\Temp\{5BCDE143-1155-42F1-96B0-BA6CEDDE4BCE}\IsConfig.ini
InstallShield 10:31:40: Got '{D258B9B7-2EBC-4492-9CBC-CD6E719034F6}' for TempPathGuid from isconfig.ini
InstallShield 10:31:40: Attempting to use temp path 'C:\DOCUME~1\User\LOCALS~1\Temp\{D258B9B7-2EBC-4492-9CBC-CD6E719034F6}'
InstallShield 10:31:40: Using new temp path
InstallShield 10:31:40: Cleaning up temp file C:\DOCUME~1\User\LOCALS~1\Temp\{5BCDE143-1155-42F1-96B0-BA6CEDDE4BCE}\IsConfig.ini
InstallShield 10:31:40: Using temp folder C:\DOCUME~1\User\LOCALS~1\Temp\{D258B9B7-2EBC-4492-9CBC-CD6E719034F6}
InstallShield 10:31:40: Installing engine...
InstallShield 10:31:40: Using product language 1033
InstallShield 10:31:40: Skipping optional support file _isuser_0x0409.dll
InstallShield 10:31:40: Setting script cmdline...
InstallShield 10:31:40: Using ISSCRIPTCMDLINE: /d
InstallShield 10:31:40: ProductCode is {30629CD8-0582-4DA3-9BE2-0F75B2962EB0}
InstallShield 10:31:40: Initializing Engine
InstallShield 10:31:40: Done Initializing...
InstallShield 10:31:40: Registering Msi Server...
MSI (c) (A4!40) [10:31:40:359]: Note: 1: 2732 2: 0
InstallShield 10:31:40: Invoking script function SetInstallDir
MSI (c) (A4!40) [10:31:44:484]: PROPERTY CHANGE: Adding INSTALLDIR property. Its value is 'D:\Firstbeat Uploader\'.
InstallShield 10:31:44: CallScriptFunctionFromMsiCA() ends
Action ended 10:31:44: SetInstallDir. Return value 1.
MSI (c) (A4:3C) [10:31:44:531]: Doing action: LaunchConditions[/CODE]

First I thought this was due the Win2k machine having older MSI version but it also has MSI 3.01 (3.01.4000.4033), the same as my WinXP machine (3.01.4001.5512).

This same type of custom action has worked fine in earlier projects built with IS12.

IS2010 is useless for me if the CA's dont work on some machines.

Attached is whole log under Win2k.
Labels (1)
0 Kudos
(1) Reply
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

A hotfix has been provided in KB Q206628 that should resolve this behavior.
0 Kudos