cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dinesh_redhawk
Level 6

How to have Handle hMSI in Suite Installer Installscript functions?

I have written a installscript code to detect free space and ram availability in the host machine.
The function works in a Installscript MSI project. BUT the same function doesn't work in Suite Installer.
Dont know why? Only difference in both the functions is in function definition:
For ISMSI project its: function CheckForMemoryAndDiskSpaceNEW(hMSI) which is getting called from OnBegin

For Suite project its : function CheckForMemoryAndDiskSpace(oExtension) which is getting invoked via CA in Onbegin event

The code is here:



The variable szFreeSpace gets proper value when run from ISMSI project, But becomes ZERO when run from Suite Installer.

Can anyone tell me whats the problem here?

OBSERVATIONS:
TARGETDIR is null. If i replace it with WINDIR, then also its null. why these are null?

Please.
Thanks
Labels (1)
0 Kudos
(2) Replies
rguggisberg
Level 13

Function definition is correct. I think it may have to do with where the action is sequenced. Try putting it as the first event in OnStaging.. I realize you may need the info before that... but just try that as a test.

Also LOG the install and see what that tells you.
0 Kudos
dinesh_redhawk
Level 6

rguggisberg wrote:
Function definition is correct. I think it may have to do with where the action is sequenced. Try putting it as the first event in OnStaging.. I realize you may need the info before that... but just try that as a test.

Also LOG the install and see what that tells you.


Solution: Looks like for some strange problem, Suite installer doesnt populate properties like WindowsVolume, WindowsFolder, WINDIR etc.
The only thing that worked for me in my case is ProgramFiles64Folder.
So, i will go with this property.

I agree with rguggisberg, that my INSTALLDIR might not getting populated because the stage at which i am checking is at the atmost starting. So, perhaps by that time INSTALLDIR property has not got its value.

Thanks friends.

Happy Learning !!
0 Kudos