To advertise an application on a per-user installation basis when the application requires elevated (that is, system) privileges for installation, use the guidelines in the following list:
- Your process must be a service that runs under the LocalSystem system account on Windows XP or later.
- Generate an advertise script by calling MsiAdvertiseProduct or MsiAdvertiseProductEx.
- Your process must impersonate the user that is the target for the advertisement.
- Call MsiAdvertiseScript, and use the flags SCRIPTFLAGS_CACHEINFO | SCRIPTFLAGS_REGDATA_APPINFO | SCRIPTFLAGS_REGDATA_CNFGINFO | SCRIPTFLAGS_SHORTCUTS.
When you follow the guidelines, you advertise an application to a specified user, and when the user chooses to install, the application is installed with elevated privileges.
Related topics
Patching Per-User Managed Applications
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
