MSI.GetProductCode

string MSI.GetProductCode (

string ComponentGUID )

Description

Calls the MsiGetProductCode function to get the product code of an application by using the component GUID of an installed or advertised component of the application. During initialization, an application must determine under which product code it has been installed or advertised.

Parameters

ComponentGUID

(string) The identifier (GUID) of the component that has been installed by the application. This string must be an identifier string enclosed in curly braces, for example: "{1638E94C-DA3C-44BD-88FB-5CC76B59BE46}". This will be typically the component containing the executable file of the application.

Returns

(string) A string containing the product code based on the component GUID. If this action fails, a blank string (i.e. "") will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the action editor, you can use this field to specify a variable that the return value will be stored in.

See also: Related Actions