將使用者資料夾位置變更到另一個分割區後出現 Sysprep 錯誤

將使用者資料夾位置變更到另一個分割區後出現 Sysprep 錯誤

我在虛擬機器上執行 Windows 10 Pro(版本 1607,7 月在 MSDN 上發布),並在該電腦上獲得了多個分割區。

對於部署,我使用此應答檔案。此應答檔案由 Windows 系統映像管理員驗證。

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="specialize">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <CopyProfile>true</CopyProfile>
            <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
        </component>
    </settings>
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <FolderLocations>
                <ProfilesDirectory>U:\</ProfilesDirectory>
            </FolderLocations>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:e:/sources/install.wim#Windows 10 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

每當我刪除用於更改使用者資料夾的部分時,該應答檔案就可以工作。

    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <FolderLocations>
                <ProfilesDirectory>U:\</ProfilesDirectory>
            </FolderLocations>
        </component>
    </settings>

我 100%U:\目錄在那裡,並嘗試更改目錄分隔符並嘗試將其更改為U:\Profiles.

每當我使用以下命令 sysprep 這台機器時:

sysprep.exe /generalize /oobe /unattend:unattend:xml

我在安裝裝置的 Windows 標誌上收到以下錯誤訊息。

在此輸入影像描述

在此輸入影像描述

我還嘗試將我的機器更新到最新版本。請注意,我的 Windows 尚未啟動。

我該如何解決這個問題?

答案1

我懷疑這可能是因為這個/generalize選項而發生的。

Sysprep 的日常工作是準備 Windows 進行克隆。為此,它會從註冊表中刪除所有系統特定資訊(包括磁碟機號碼分配),並在重新啟動後呼叫 Windows 安裝程式。

Windows 安裝程式對它「喚醒」的電腦不做任何假設。它知道哪個驅動器是 C: 的唯一原因是 BCD 儲存告訴它這一點。例如,可能會弄亂 BCD 儲存並將 Windows 安裝到 E: 而不是 C:。由於沒有有關係統的其他信息,安裝程式將開始設備檢測,並按照找到分區的順序分配驅動器號。如果你的 U: 磁碟機是第一個硬碟上的第四個分割區,它可能會被指派字母 F:,而不是 U:(哈哈我只是說 F: U:)。

如果您不使用該/generalize選項,則 Sysprep 將不會處理應答檔案的<Generalize>或部分(這是您的設定所在的位置)。所以你看你現在陷入了困境。<Specialize>CopyProfile


嘗試以下操作:
ProfilesDirectory設定放回應答檔案中,並使用該/generalize選項重新執行 Sysprep。一旦出錯,請查看該\Windows\Panther\setuperr.log文件(或其中的某個子目錄 - 您可能會看到幾個文件,因此請查找帶有今天日期的文件)。在該檔案中,Windows 安裝程式應該為您提供進程失敗的確切原因(即,哪些特定通道和設定導致了錯誤,以及它遇到了什麼問題)。

筆記Microsoft 強烈反對使用此參數。他們警告說,更改預設值將阻止升級並阻止 Windows 應用程式商店應用程式正常運作。基本上是不支持的根據他們自己的功能文檔

相關內容