Export (0) Print
Expand All
Expand Minimize

MsiProcessAdvertiseScript function

The MsiProcessAdvertiseScript function processes an advertise script file into the specified locations.

Syntax


UINT MsiProcessAdvertiseScript(
  _In_  LPCTSTR szScriptFile,
  _In_  LPCTSTR szIconFolder,
  _In_  HKEY hRegData,
  _In_  BOOL fShortcuts,
  _In_  BOOL fRemoveItems
);

Parameters

szScriptFile [in]

The full path to a script file generated by MsiAdvertiseProduct or MsiAdvertiseProductEx.

szIconFolder [in]

An optional path to a folder in which advertised icon files and transform files are located. If this parameter is NULL, no icon or transform files are written.

hRegData [in]

A registry key under which registry data is to be written. If this parameter is NULL, the installer writes the registry data under the appropriate key, based on whether the advertisement is per-user or per-machine. If this parameter is non-NULL, the script will write the registry data under the specified registry key rather than the normal location. In this case, the application will not get advertised to the user.

fShortcuts [in]

TRUE if shortcuts should be created. If a special folder is returned by SHGetSpecialFolderLocation it will hold the shortcuts.

fRemoveItems [in]

TRUE if specified items are to be removed instead of created.

Return value

ValueMeaning
ERROR_SUCCESS

The function completed successfully.

ERROR_ACCESS_DENIED

The calling process was not running under the LocalSystem account.

An error relating to an action

See Error Codes.

Initialization Error

An error relating to initialization occurred.

ERROR_CALL_NOT_IMPLEMENTED

This function is not available for this platform.

 

Remarks

The process calling this function must be running under the LocalSystem account. To advertise an application for per-user installation to a targeted user, the thread that calls this function must impersonate the targeted user. If the thread calling this function is not impersonating a targeted user, the application is advertised to all users for installation with elevated privileges.

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

MsiProcessAdvertiseScriptW (Unicode) and MsiProcessAdvertiseScriptA (ANSI)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft