Advertise method of the Win32_Product class
The Advertise WMI class method advertises an associated Win32_Product instance using the installation package provided through the PackageLocation parameter and any supplied command line options.
Note
For more information about support or requirements for installation on a specific operating system, see Operating System Availability of WMI Components.
This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.
Syntax
uint32 Advertise(
[in] string PackageLocation,
[in] string Options
);
Parameters
-
PackageLocation [in]
-
The path to the package to be advertised.
-
Options [in]
-
Command line options for the advertisement. Format as property**=**setting.
-
AllUsers
-
Indicates whether the operation should be applied to all users on the computer. If FALSE, the operation is applied to only the current user. This parameter is no longer used.
Return value
Return code | Description |
---|---|
|
Successful completion |
|
RPC Server Fault Error |
Requirements
Minimum supported client |
Windows XP |
Minimum supported server |
Windows Server 2003 |
Namespace |
Root\CIMV2 |
MOF |
|
DLL |
|