Windows-7

Windows 7 無人值守安裝 - 並非真正“無人值守”

  • March 8, 2012

幾天來,我一直在嘗試為 Windows 7 獲取正確且有效的 Unattended.xml 應答文件。嘗試創建一個完全無人參與的 Windows 7 安裝,技術人員可以在其中插入 USB 驅動器,從它啟動,然後等待設置去完成。我正在使用的圖像已經使用無人值守的答案文件進行了系統準備,並且從那時起進行了每次更改。這是一個耗時的過程,因為 WDS/Server 安裝不是一個選項,只有這種預映像 USB 設備的方法。

我一直在 technet、Serverfault(和其他 StackExchange 站點)、隨機部落格和此類站點嘗試不同的 answerfile 選項,這些選項將(應該/應該)創建一個完整的無人值守安裝。

使用 WSIM 管理/寫入/修改/檢查應答文件和 DISM 管理圖像。

無論我在 WinPE pass 中放置什麼選項,總是會發生以下情況:

  • PE 詢問語言/區域設置/
  • PE 顯示 EULA 協議
  • PE Disk configuration 一直顯示,提示分區

我需要在不詢問使用者任何內容的情況下開始、處理和完成設置

我擁有的最新 XML 應答文件如下:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
   <settings pass="windowsPE">
   <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <SetupUILanguage>
       <UILanguage>en-us</UILanguage>
       </SetupUILanguage>
       <UILanguage>en-us</UILanguage>
       <InputLocale>0409:00000409</InputLocale>
       <SystemLocale>en-us</SystemLocale>
       <UserLocale>en-us</UserLocale>
   </component>
   <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <DiskConfiguration>
       <WillShowUI>OnError</WillShowUI>
       <Disk wcm:action="add">
       <DiskID>0</DiskID>
           <WillWipeDisk>true</WillWipeDisk>
           <CreatePartitions>
           <CreatePartition wcm:action="add">
           <Order>1</Order>
           <Size>100</Size>
               <Type>Primary</Type>
           </CreatePartition>
        <CreatePartition wcm:action="add">
           <Order>2</Order>
               <Type>Primary</Type>
               <Extend>true</Extend>
           </CreatePartition>
           </CreatePartitions>
           <ModifyPartitions>
           <ModifyPartition wcm:action="add">
               <Format>NTFS</Format>
               <Label>System</Label>
               <Order>1</Order>
           <Active>true</Active>
               <PartitionID>1</PartitionID>
           </ModifyPartition>
           <ModifyPartition wcm:action="add">
               <Format>NTFS</Format>
               <Label>OS</Label>
               <Order>2</Order>
               <PartitionID>2</PartitionID>
           </ModifyPartition>
           </ModifyPartitions>
       </Disk>
       </DiskConfiguration>
       <ImageInstall>
       <OSImage>
           <InstallTo>
           <DiskID>0</DiskID>
           <PartitionID>1</PartitionID>
           </InstallTo>
       <InstallFrom>
           <MetaData wcm:action="add">
               <Key>/IMAGE/INDEX</Key>
               <Value>1</Value>
           </MetaData>
           </InstallFrom>
           <WillShowUI>OnError</WillShowUI>
       </OSImage>
       </ImageInstall>
       <UserData>
         <AcceptEula>true</AcceptEula>
       <ProductKey>
           <Key>----</Key>
           <WillShowUI>----</WillShowUI>
       </ProductKey>
       <FullName>----</FullName>
       <Organization>----</Organization>
       </UserData>
   </component>
   </settings>
   <settings pass="specialize">
   <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" 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>
       <TimeZone>----</TimeZone>
       <ProductKey>----</ProductKey>
       <RegisteredOrganization>----</RegisteredOrganization>
       <RegisteredOwner>----</RegisteredOwner>
   </component>
   <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <RunSynchronous>
       <RunSynchronousCommand wcm:action="add">
           <Path>net user administrator /active:yes</Path>
           <Order>1</Order>
       </RunSynchronousCommand>
       </RunSynchronous>
   </component>
   <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <InputLocale>0409:00000409</InputLocale>
       <SystemLocale>en-us</SystemLocale>
       <UILanguage>en-us</UILanguage>
       <UserLocale>en-us</UserLocale>
   </component>
   </settings>
   <settings pass="oobeSystem">
   <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <OOBE>
       <HideEULAPage>true</HideEULAPage>
       <NetworkLocation>Work</NetworkLocation>
       <ProtectYourPC>1</ProtectYourPC>
       <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
       </OOBE>
       <RegisteredOrganization>----</RegisteredOrganization>
       <RegisteredOwner>----</RegisteredOwner>
       <TimeZone>TZ</TimeZone>
       <UserAccounts>
       <AdministratorPassword>
           <Value>aBcDe</Value>
           <PlainText>false</PlainText>
       </AdministratorPassword>
       <LocalAccounts>
           <LocalAccount wcm:action="add">
           <Password>
               <Value>aBcDe</Value>
               <PlainText>false</PlainText>
           </Password>
           <Description>Local Administrator</Description>
           <DisplayName>Administrator</DisplayName>
           <Group>Administrators</Group>
           <Name>Administrator</Name>
           </LocalAccount>
       </LocalAccounts>
       </UserAccounts>
       <AutoLogon>
       <Password>
           <Value>aBCdE</Value>
           <PlainText>false</PlainText>
       </Password>
       <Enabled>true</Enabled>
       <LogonCount>5</LogonCount>
       <Username>administrator</Username>
       <Domain></Domain>
       </AutoLogon>
   </component>
   <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <InputLocale>0409:00000409</InputLocale>
       <SystemLocale>en-us</SystemLocale>
       <UserLocale>en-us</UserLocale>
       <UILanguage>en-us</UILanguage>
   </component>
   </settings>
   <cpi:offlineImage cpi:source="wim:wimfile#Windows 7 Professional" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

是否有其他人遇到過這種情況,或者知道如何更正我的答案文件以使其真正無人看管?

您是否嘗試過下載MDT套件,因此您不必手動編輯 xml 文件?

當我開始使用 Win 7 圖像時,我使用了本指南,發現它非常有用: http ://theitbros.com/sysprep-a-windows-7-machine-%E2%80%93-start-to-finish

如果我沒記錯的話,當您進行 sysprep 時,它會將 xml 複製到 system32 文件夾中的某個位置,並將該副本用於其餘的設置。

貼出我的手機,如果關閉了,請原諒。

引用自:https://serverfault.com/questions/367245