Expand Minimize

MsiGetProductInfoFromScript function

The MsiGetProductInfoFromScript function returns product information for a Windows Installer script file.

Syntax


UINT MsiGetProductInfoFromScript(
  _In_     LPCTSTR szScriptFile,
  _Out_    LPTSTR lpProductBuf39,
  _Out_    LANGID *plgidLanguage,
  _Out_    DWORD *pdwVersion,
  _Out_    LPTSTR lpNameBuf,
  _Inout_  DWORD *pcchNameBuf,
  _Out_    LPTSTR lpPackageBuf,
  _Inout_  DWORD *pcchPackageBuf
);

Parameters

szScriptFile [in]

A null-terminated string specifying the full path to the script file. The script file is the advertise script that was created by calling MsiAdvertiseProduct or MsiAdvertiseProductEx.

lpProductBuf39 [out]

Points to a buffer that receives the product code. The buffer must be 39 characters long. The first 38 characters are for the product code GUID, and the last character is for the terminating null character.

plgidLanguage [out]

Points to a variable that receives the product language.

pdwVersion [out]

Points to a buffer that receives the product version.

lpNameBuf [out]

Points to a buffer that receives the product name. The buffer includes a terminating null character.

pcchNameBuf [in, out]

Points to a variable that specifies the size, in characters, of the buffer pointed to by the lpNameBuf parameter. This size should include the terminating null character. When the function returns, this variable contains the length of the string stored in the buffer. The count returned does not include the terminating null character. If the buffer is not large enough, the function returns ERROR_MORE_DATA, and the variable contains the size of the string in characters, without counting the null character.

lpPackageBuf [out]

Points to a buffer that receives the package name. The buffer includes the terminating null character.

pcchPackageBuf [in, out]

Points to a variable that specifies the size, in characters, of the buffer pointed to by the lpPackageNameBuf parameter. This size should include the terminating null character. When the function returns, this variable contains the length of the string stored in the buffer. The count returned does not include the terminating null character. If the buffer is not large enough, the function returns ERROR_MORE_DATA, and the variable contains the size of the string in characters, without counting the null character.

Return value

ValueMeaning
ERROR_SUCCESS

The function completed successfully.

ERROR_INVALID_PARAMETER

An invalid argument was passed to the function.

ERROR_MORE_DATA

A buffer was too small to hold the entire value.

ERROR_INSTALL_FAILURE

Could not get script information.

ERROR_CALL_NOT_IMPLEMENTED

This function is only available on Windows 2000 and Windows XP.

 

Requirements

Version

Windows Installer 5.0 on Windows Server 2012, Windows 8, 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 or Windows XP. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version.

Header

Msi.h

Library

Msi.lib

DLL

Msi.dll

Unicode and ANSI names

MsiGetProductInfoFromScriptW (Unicode) and MsiGetProductInfoFromScriptA (ANSI)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft