密钥 (microsoft-windows-pnpcustomizationsnonwinpe-driverpaths-pathandcredentials-key)

Key 指定用于标识设备驱动程序路径的唯一字符串。

Key 的值作为 PathAndCredentials 元素的属性添加到答案文件中。 属性 wcm:keyValue 用于标识每个唯一的设备驱动程序路径。 例如,可以使用 Key 值 1、2 和 3 指定三个不同的设备驱动程序路径。

指定标识设备驱动程序路径的唯一字符串。 Key 是一个字符串。 例如,可以指定值“我的驱动程序路径”、“1”或其他唯一标识符。

该字符串类型不支持空元素。 请勿为该设置创建空值。

有效配置阶段

auditSystem

offlineServicing

父层次结构

Microsoft-Windows-PnpCustomizationsNonWinPE | DriverPaths | PathAndCredentials | Key

应用于

有关此组件支持的受支持 Windows 版本和体系结构的列表,请参阅 Microsoft-Windows-PnpCustomizationsNonWinPE

XML 示例

以下 XML 输出指定设备驱动程序两个附加位置的 UNC 路径,以及用于访问这些路径的凭据。

<DriverPaths>
<!-- First PathAndCredentials list item -->
   <PathAndCredentials wcm:action="add" wcm:keyValue="1">
      <Path>\\myFirstDriverPath\DriversFolder</Path>
      <Credentials>
         <Domain>MyDomain</Domain>
         <Username>MyUsername</Username>
         <Password>MyPassword</Password>
      </Credentials>
   </PathAndCredentials>
<!-- Second PathAndCredentials list item -->
   <PathAndCredentials wcm:action="add" wcm:keyValue="2">
      <Path>C:\Drivers</Path>
      <Credentials>
         <Domain>MyComputerName</Domain>
         <Username>MyUsername</Username>
         <Password>MyPassword</Password>
      </Credentials>
   </PathAndCredentials>
</DriverPaths>

PathAndCredentials