Click to Rate and Give Feedback
MSDN
MSDN Library
WMI Reference
WMI Classes
Win32 Classes
Win32_Product
 Install Method of the Win32_Product...

  Switch on low bandwidth view
Install Method of the Win32_Product Class

The static Install WMI class method installs 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

MOF
uint32 Install(
  [in]  string PackageLocation,
  [in]  string Options,
  [in]  boolean AllUsers
);

Parameters

PackageLocation [in]

The path to the package to be installed.

Options [in]

The command line options for the installation. Format as property=setting.

AllUsers [in]

This parameter value must be present, but it is ignored. True is the recommended value.

Return Value

Returns one of the following values. For more information and other integer values, see the error code documentation in the Windows Installer API.

Return codeDescription
0

Successful completion

2147549445

RPC Server Fault Error

 

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
MOFMsi.mof
DLLMsiprov.dll
Namespace\root\cimv2

See Also

Installed Applications Classes
Win32_Product

Send comments about this topic to Microsoft

Build date: 6/15/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker