Click to Rate and Give Feedback
MSDN
MSDN Library
WMI Reference
WMI Classes
Win32 Classes
Win32_Product
 Install Method of the Win32_Product...
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

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 code Description

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

Client Requires Windows Vista, Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0 SP4 and later.
Server Requires Windows Server 2008, Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0 SP4 and later.
MOF

Declared in Msi.mof.

DLL

Requires Msiprov.dll.

Namespace

Defined in \root\cimv2.

See Also

Installed Applications Classes
Win32_Product


Send comments about this topic to Microsoft

Build date: 8/20/2008

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