ApplyPatch Method (patchPackage, commandLine)

DTF API

Copy image CopyHover image
Deployment Tools Foundation ApplyPatch Method (patchPackage, commandLine)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerInstallerApplyPatch(String, String)
For each product listed by the patch package as eligible to receive the patch, ApplyPatch invokes an installation and sets the PATCH property to the path of the patch package.
Declaration Syntax
C# Visual Basic Visual C++ F#
public static void ApplyPatch(
	string patchPackage,
	string commandLine
)
Public Shared Sub ApplyPatch ( 
	patchPackage As String,
	commandLine As String
)
public:
static void ApplyPatch(
	String^ patchPackage, 
	String^ commandLine
)
static member ApplyPatch : 
        patchPackage : string * 
        commandLine : string -> unit 
Parameters
patchPackage (String)
path to the patch package
commandLine (String)
optional command line property settings
Remarks

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

Win32 MSI API: MsiApplyPatch

Exceptions
Exception Condition
InstallerException There was an error applying the patch

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)