/// <summary> /// 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. /// </summary> /// <param name="patchPackage">path to the patch package</param> /// <param name="installPackage">path to the product to be patched, if installType /// is set to <see cref="InstallType.NetworkImage"/></param> /// <param name="installType">type of installation to patch</param> /// <param name="commandLine">optional command line property settings</param> /// <exception cref="InstallerException">There was an error applying the patch</exception> /// <remarks><p> /// The <see cref="RebootRequired"/> and <see cref="RebootInitiated"/> properties should be /// tested after calling this method. /// </p><p> /// Win32 MSI API: /// <a href="http://msdn.microsoft.com/library/en-us/msi/setup/msiapplypatch.asp">MsiApplyPatch</a> /// </p></remarks> public static void ApplyPatch(string patchPackage, string installPackage, InstallType installType, string commandLine) { uint ret = NativeMethods.MsiApplyPatch(patchPackage, installPackage, (int)installType, commandLine); Installer.CheckInstallResult(ret); }