InstallProduct Method (packagePath, commandLine)

DTF API

Copy image CopyHover image
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++ F#
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
)
static member InstallProduct : 
        packagePath : string * 
        commandLine : string -> unit 
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.dll) Version: 3.0.0.0 (3.11.1.2318)