MSI.LocateComponent

table MSI.LocateComponent ( 

string ComponentGUID )

Example 1

-- Get the component path.
tbComponent = MSI.LocateComponent("{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}");

-- Check if it was successful and that the component is installed locally.
if (tbComponent) then
    if (tbComponent.InstallState == INSTALLSTATE_LOCAL) then
        Dialog.Message("Information", "The component is installed locally.");
    end
else
    -- Show a message with the error.
    nError = Application.GetLastError();
    Dialog.Message("Error", _tblErrorMessages[nError], MB_OK, MB_ICONEXCLAMATION);
end

Checks to see if the component with GUID "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}" is installed locally and shows an information message. If the action fails, an error dialog is shown.

See also:  Related Actions