MSI Factory 2.3

MSI.GetFeatureValidStates

MSI.GetFeatureValidStates

This is the first topic This is the last topic  

MSI.GetFeatureValidStates

This is the first topic This is the last topic  

OverviewExamples

table MSI.GetFeatureValidStates (

number hInstall,

string Feature )

Example 1

tbState = MSI.GetFeatureValidStates(_hInstall, "Test_Feature");

-- Test for error

error = Application.GetLastError();

 

if (tbState) then

   strMessage = "InstallState: "..tbState.InstallState.."\r\n";

   if (tbState.INSTALLSTATE_ADVERTISED) then

       strMessage = strMessage.."The install state is set to advertised.\r\n";

   end

   if (tbState.INSTALLSTATE_ABSENT) then

       strMessage = strMessage.."The install state is set to absent.\r\n";

   end

   if (tbState.INSTALLSTATE_LOCAL) then

       strMessage = strMessage.."The install state is set to local.\r\n";

   end

   if (tbState.INSTALLSTATE_SOURCE) then

       strMessage = strMessage.."The install state is set to source.\r\n";

   end

   if (tbState.INSTALLSTATE_DEFAULT) then

       strMessage = strMessage.."The install state is set to use the default location: local or source.\r\n";

   end

 

   Dialog.Message("Installation State", strMessage);

 

else

   if (error ~= 0) then

       Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);

   end

end

Returns the valid installation state of "Test_Feature" and shows the result in a dialog message.

See also: Related Actions


Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us