Exportar (0) Imprimir
Expandir Tudo
EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

MsiAdvertiseProduct function

The MsiAdvertiseProduct function generates an advertise script or advertises a product to the computer. The MsiAdvertiseProduct function enables the installer to write to a script the registry and shortcut information used to assign or publish a product. The script can be written to be consistent with a specified platform by using MsiAdvertiseProductEx.

Syntax


UINT MsiAdvertiseProduct(
  _In_  LPCTSTR szPackagePath,
  _In_  LPCTSTR szScriptfilePath,
  _In_  LPCTSTR szTransforms,
  _In_  LANGID lgidLanguage
);

Parameters

szPackagePath [in]

The full path to the package of the product being advertised.

szScriptfilePath [in]

The full path to script file that will be created with the advertise information. To advertise the product locally to the computer, set ADVERTISEFLAGS_MACHINEASSIGN or ADVERTISEFLAGS_USERASSIGN.

FlagMeaning
ADVERTISEFLAGS_MACHINEASSIGN
0

Set to advertise a per-machine installation of the product available to all users.

ADVERTISEFLAGS_USERASSIGN
1

Set to advertise a per-user installation of the product available to a particular user.

 

szTransforms [in]

A semicolon-delimited list of transforms to be applied. The list of transforms can be prefixed with the @ or | character to specify the secure caching of transforms. The @ prefix specifies secure-at-source transforms and the | prefix indicates secure full path transforms. For more information, see Secured Transforms. This parameter may be null.

lgidLanguage [in]

The installation language to use if the source supports multiple languages.

Return value

ValueMeaning
ERROR_SUCCESS

The function completed successfully.

An error relating to an action

See Error Codes.

Initialization Error

An initialization error occurred.

ERROR_CALL_NOT_IMPLEMENTED

This error is returned if an attempt is made to generate an advertise script on any platform other than Windows 2000 or Windows XP. Advertisement to the local computer is supported on all platforms.

 

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

MsiAdvertiseProductW (Unicode) and MsiAdvertiseProductA (ANSI)

See also

Multiple-Package Installations

 

 

Contribuições da comunidade

ADICIONAR
Mostrar:
© 2014 Microsoft