MsiSetProperty

[This is preliminary documentation and subject to change.]

The MsiSetProperty function sets the value for an installation property.

UINT MsiSetProperty(
  MSIHANDLE hInstall,   // installer handle
  LPCTSTR szName,       // property identifier, case-sensitive
  LPCTSTR szValue       // property value, NULL to undefine property
);
 

Parameters

hInstall
Handle to the installer.
szName
Specifies the name of the property.
szValue
Specifies the value of the property.

Return Values

ERROR_FUNCTION_FAILED
The function failed.
ERROR_INVALID_HANDLE
An invalid or inactive handle was supplied.
ERROR_INVALID_PARAMETER
An invalid parameter was passed to the function.
ERROR_SUCCESS
The function succeeded.

Remarks

If the property is not defined, it is created by the MsiSetProperty function. If the value is NULL or an empty string, the property is removed.

QuickInfo

  Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in msiquery.h.
  Import Library: Use msi.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT.

See Also

Database Access Reference, Installer State Access Functions