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
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| MOF | Msi.mof |
| DLL | Msiprov.dll |
| Namespace | \root\cimv2 |
See Also
- Installed Applications Classes
- Win32_Product
Send comments about this topic to Microsoft
Build date: 6/15/2009