InstallProduct Method (packagePath, commandLine)

Microsoft Deployment Tools

Deployment Tools Foundation InstallProduct Method (packagePath, commandLine)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerInstallerInstallProduct(String, String)
Opens an installer package and initializes an install session.
Declaration Syntax
C# Visual Basic Visual C++
public static void InstallProduct(
	string packagePath,
	string commandLine
)
Public Shared Sub InstallProduct ( _
	packagePath As String, _
	commandLine As String _
)
public:
static void InstallProduct(
	String^ packagePath, 
	String^ commandLine
)
Parameters
packagePath (String)
path to the patch package
commandLine (String)
command line property settings
Remarks

To completely remove a product, set REMOVE=ALL in .

This method displays the user interface with the current settings and log mode. You can change user interface settings with the SetInternalUI(InstallUIOptions) and SetExternalUI(ExternalUIHandler, InstallLogModes) functions. You can set the log mode with the EnableLog(InstallLogModes, String) function.

The RebootRequired and RebootInitiated properties should be tested after calling this method.

Win32 MSI API: MsiInstallProduct

Exceptions
Exception Condition
InstallerException There was an error installing the product

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller) Version: 3.0.0.0 (3.5.1623.0)