Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Installer
Installer Database
Database Functions
 MsiSetProperty Function
MsiSetProperty Function

The MsiSetProperty function sets the value for an installation property.

Syntax

C++
UINT MsiSetProperty(
  __in  MSIHANDLE hInstall,
  __in  LPCTSTR szName,
  __in  LPCTSTR szValue
);

Parameters

hInstall [in]

Handle to the installation provided to a DLL custom action or obtained through MsiOpenPackage, MsiOpenPackageEx, or MsiOpenProduct.

szName [in]

Specifies the name of the property.

szValue [in]

Specifies the value of the property.

Return Value

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.

Requirements

Version

Windows Installer 5.0 on Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003, Windows XP, and Windows 2000

Header

Msiquery.h

Library

Msi.lib

DLL

Msi.dll

Unicode and ANSI names

MsiSetPropertyW (Unicode) and MsiSetPropertyA (ANSI)

See Also

Installer State Access Functions

 

 

Send comments about this topic to Microsoft

Build date: 2/4/2010

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker