Skip to main content

2026 年 5 月 18 日

在映像上建立後置 Sysprep 指令碼/批次檔案並複製憑證

匯入憑證並記錄指紋後,您必須建立後置 Sysprep 指令碼/批次檔案並複製憑證。

使用建置後組態指令碼 SetupComplete.cmd 匯入 SSL 憑證並設定 HTML Access 登錄。

http://technet.microsoft.com/en-us/library/dd744268%28v=ws.10%29.aspx

例如:

  1. 在 C: 磁碟機下複製 SSL 憑證檔案。在此範例中為「C:\desktone_ca_cert」檔案。

  2. 在「%WINDIR%\Setup\Scripts\」資料夾下建立檔案 SetupComplete.cmd。建立「Scripts」資料夾 (如果不存在)。

  3. 在 SetupComplete.cmd 檔案中新增下列命令。指紋值是您在步驟 1 中複製的值。

    **附註:**如果憑證鏈結中有根憑證和中繼憑證,則必須在批次檔中新增適當的 CertUtil 命令。

    CertUtil -importPFX -f -p "<password>" "C:\desktone_ca_cert.pfx"
    
    reg add "HKLM\SOFTWARE\Omnissa\Blast\Config" /f /v "SslHash" /t REG_SZ /d "31 2a 32 50 1a 0b 34 b1 65 46 13 a8 0a 5e f7 43 6e a9 2c 3e" 
    
    del /F /Q "C:\desktone_ca_cert.pfx"
    
    del /F /Q "%systemroot%\setup\scripts\SetupComplete.cmd"
    
  4. 儲存 SetupComplete.cmd 檔案。您可以在測試機器上測試 SetupComplete.cmd 檔案。

Windows XP

  • 依照 Desktone 後置 Sysprep 命令執行方法,匯入 SSL 憑證並設定 HTML Access 登錄。

  • 安裝適用於 Windows XP 的系統管理工具包,因為作業系統安裝並未隨附 CertUtil 工具。

    http://www.microsoft.com/en-us/download/details.aspx?id=16770

    例如:

    1. 在 C: 磁碟機下複製 SSL 憑證檔案。在此範例中為 C:\desktone_ca_cert.pfx 檔案。

    2. 建立資料夾路徑 C:\Sysprep\i386\$OEM$\

    3. 現在,在 C:\Sysprep\i386\$OEM$\ 下建立 postprep-extra.bat 檔案,然後在批次檔案中新增下列命令。指紋值是您匯入憑證後在上方記錄的值。

      **附註:**如果憑證鏈結中有根憑證和中繼憑證,則必須在 vbatch 檔案中新增適當的 CertUtil 命令。

      CertUtil -importPFX -f -p "<password>" "C:\desktone_ca_cert.pfx"
          
      del /F /Q "C:\desktone_ca_cert.pfx.pfx"
          
      reg add "HKLM\SOFTWARE\Omnissa\Blast\Config" /f /v "SslHash" /t REG_SZ /d "31 2a 32 50 1a 0b 34 b1 65 46 13 a8 0a 5e f7 43 6e a9 2c 3e"
          
      
    4. 儲存 postprep-extra.bat 檔案。您不需要執行命令來刪除 postprep-extra.bat 檔案,因為 Sysprep 會在部署成功後刪除 C:\Sysprep 資料夾。 您可以在測試機器上測試 SetupComplete.cmd 檔案。

後續步驟

將映像轉換為最佳配置模式或重新封裝

Was this page helpful?

Provide feedback for this topic

Was this topic helpful?

Please do not include any personal or confidential information.

Generating link…