WinREConfig XML 參考

此參考描述用來撰寫winreconfig.xml檔案的所有 xml 元素,可讓您在 WinRE 中定義自訂支援和診斷工具。

範例WinREConfig.xml檔案

<?xml version="1.0" encoding="utf-8"?>
<!-- WinREConfig.xml -->
<Recovery>
   <RecoveryTools>
      <RelativeFilePath>OEMDiagnostics.exe</RelativeFilePath>
      <CommandLineParam>/param1 /param2</CommandLineParam>
      <RequireLogonOnReset></RequireLogonOnReset>
   </RecoveryTools>
</Recovery>

可用元素的描述

元素 描述
RelativeFilePath Recenv.exe 所在之資料夾的 \Tools 子資料夾的相對路徑。 例如,如果Recenv.exe位於 X:\WinRE 中,則此欄位中指定的路徑會相對於 X:\WinRE\tools。
CommandLineParam 執行自訂工具時所使用的選擇性參數。
RequireLogonOnReset 出現時,[重設此電腦] - > [移除所有專案] 會提示使用者選擇帳戶並輸入密碼。

建立WinREConfig.xml

  1. 在 Windows RE 工作目錄中建立 tools 子目錄。 例如,在 中 Sources\Recovery\Tools

  2. 建立名為 winreconfig.xml 的.xml檔案。

  3. 複製下列內容,並將其貼入winreconfig.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <!-- WinREConfig.xml -->
    <Recovery>
    <RecoveryTools>
        <RelativeFilePath></RelativeFilePath>
        <CommandLineParam></CommandLineParam>
        <RequireLogonOnReset></RequireLogonOnReset>
    </RecoveryTools>
    </Recovery>
    
  4. 設定 xml 檔案中的專案。

  5. 將檔案儲存在工作Windows RE目錄中 Sources\Recovery\Tools