MSI.OpenProduct

number MSI.OpenProduct ( 

string ProductCode )

Example 1

-- Get the product handle.
nProductHandle = MSI.OpenProduct("{78B82B0B-9AD9-40C0-B994-F72C21B52723}");

if (nProductHandle) then
    tbFeatureInfo = MSI.GetFeatureInfo(nProductHandle, "MyTargetFeature", INSTALLFEATUREATTRIBUTE_FAVORLOCAL);
    if (tbFeatureInfo) then
        -- Show a dialog with the feature info.
        Dialog.Message("Feature Info", "Title: "..tbFeatureInfo.Title.."\r\nDescription: "..tbFeatureInfo.Description);
    else
        -- An error occurred.
        nError = Application.GetLastError();
        Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
    end

    -- Finished using the product handle, so close it.
    if (not MSI.CloseHandle(nProductHandle)) then
        Dialog.Message("Error", "Failed to close product handle.");
    end
else
    Dialog.Message("Error", "Failed to get product handle.");
end

Gets the title and description of the "MyTargetFeature" feature and shows it in a dialog message.

See also:  Related Actions