Beispiel #1
0
 /// <summary>
 /// Adds a single .cab or .msu file to a Windows® image.
 /// </summary>
 /// <param name="session">A valid DISM Session. The DISM Session must be associated with an image. You can associate a session with an image by using the OpenSession method.</param>
 /// <param name="packagePath">A relative or absolute path to the .cab or .msu file being added, a folder with one or more packages, or a folder containing the expanded files of a single .cab file.</param>
 /// <param name="ignoreCheck">Specifies whether to ignore the internal applicability checks that are done when a package is added.</param>
 /// <param name="preventPending">Specifies whether to add a package if it has pending online actions.</param>
 /// <param name="progressCallback">A DismProgressCallback method to call when progress is made.</param>
 /// <exception cref="DismException">When a failure occurs.</exception>
 /// <exception cref="OperationCanceledException">When the user requested the operation be canceled.</exception>
 /// <exception cref="DismRebootRequiredException">When the operation requires a reboot to complete.</exception>
 public static void AddPackage(DismSession session, string packagePath, bool ignoreCheck, bool preventPending, Microsoft.Dism.DismProgressCallback progressCallback)
 {
     DismApi.AddPackage(session, packagePath, ignoreCheck, preventPending, progressCallback, null);
 }
Beispiel #2
0
 /// <summary>
 /// Adds a single .cab or .msu file to a Windows® image.
 /// </summary>
 /// <param name="session">A valid DISM Session. The DISM Session must be associated with an image. You can associate a session with an image by using the OpenSession method.</param>
 /// <param name="packagePath">A relative or absolute path to the .cab or .msu file being added, a folder with one or more packages, or a folder containing the expanded files of a single .cab file.</param>
 /// <param name="ignoreCheck">Specifies whether to ignore the internal applicability checks that are done when a package is added.</param>
 /// <param name="preventPending">Specifies whether to add a package if it has pending online actions.</param>
 /// <exception cref="DismException">When a failure occurs.</exception>
 /// <exception cref="DismRebootRequiredException">When the operation requires a reboot to complete.</exception>
 public static void AddPackage(DismSession session, string packagePath, bool ignoreCheck, bool preventPending)
 {
     DismApi.AddPackage(session, packagePath, ignoreCheck, preventPending, null);
 }