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
- :
- InstallScript MSI project does not detect UI Level properly
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Mar 18, 2014
03:38 AM
InstallScript MSI project does not detect UI Level properly
I have an old InstallScript MSI project that needs to be converted in order to be able to run also in Silent mode.
It is hardcoded by events, so what I have done is to change the OnBegin event with the following code:
The problem is that I always get Level 2 even when I run the Setup without the parameter /s.
It seems that InstallShield can't detect the proper UI Level when it's a custom InstallScript MSI project. I tried with MergeModule or Basic MSI and it works as expected.
Should I use a different approach in this case?
It is hardcoded by events, so what I have done is to change the OnBegin event with the following code:
function BOOL IsSilent()
string uiLevelName;
number buffer;
begin
buffer = 256;
MsiGetProperty(ISMSI_HANDLE, "UILevel", uiLevelName, buffer);
SprintfMsiLog("Is Silent " + uiLevelName);
if(uiLevelName = "2") then
return TRUE;
endif;
return FALSE;
end;
The problem is that I always get Level 2 even when I run the Setup without the parameter /s.
It seems that InstallShield can't detect the proper UI Level when it's a custom InstallScript MSI project. I tried with MergeModule or Basic MSI and it works as expected.
Should I use a different approach in this case?
(1) Reply
Mar 18, 2014
04:16 AM
For some reasons the UILevel property is not working as expected but I found the variable MODE to be absolutely reliable.
In this piece of code I always get the expected result, so in my opinion instead of working with UILevel we should use only MODE.
In this piece of code I always get the expected result, so in my opinion instead of working with UILevel we should use only MODE.
if(MODE = NORMALMODE)then
MessageBox("NORMAL MODE", INFORMATION);
endif;
if(MODE = RECORDMODE)then
MessageBox("RECORD MODE", INFORMATION);
endif;
if(MODE = SILENTMODE)then
MessageBox("SILENT MODE", INFORMATION);
endif;