This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to have Handle hMSI in Suite Installer Installscript functions?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 26, 2017
08:48 AM
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:
![](/legacyfs/online/vb/11372_CheckSpace.txt)
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
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
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 26, 2017
09:49 AM
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.
Also LOG the install and see what that tells you.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 26, 2017
10:00 AM
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 !!
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)