Пример #1
0
 /// <summary>
 /// Add a capability to an 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 <see cref="OpenOfflineSession(string)"/> method.</param>
 /// <param name="capabilityName">The name of the capability that is being added.</param>
 /// <param name="limitAccess">The flag indicates whether WU/WSUS should be contacted as a source location for downloading the payload of a capability. If payload of the capability to be added exists, the flag is ignored.</param>
 /// <param name="sourcePaths">A list of source locations. The function shall look up removed payload files from the locations specified in SourcePaths, and if not found, continue the search by contacting WU/WSUS depending on parameter LimitAccess.</param>
 /// <exception cref="DismException">When a failure occurs.</exception>
 /// <exception cref="DismRebootRequiredException">When the operation requires a reboot to complete.</exception>
 public static void AddCapability(DismSession session, string capabilityName, bool limitAccess, List <string> sourcePaths)
 {
     DismApi.AddCapability(session, capabilityName, limitAccess, sourcePaths, null, null);
 }
Пример #2
0
 /// <summary>
 /// Add a capability to an 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 <see cref="OpenOfflineSession(string)"/> method.</param>
 /// <param name="capabilityName">The name of the capability that is being added.</param>
 /// <exception cref="DismException">When a failure occurs.</exception>
 public static void AddCapability(DismSession session, string capabilityName)
 {
     DismApi.AddCapability(session, capabilityName, false, null, null, null);
 }