原文鏈接:Create media for automated unattended install of Windows 10 我從來沒看到過像上面的文章一樣這麼詳細的描述過Windows10的無人值守安裝過程,看完長知識了,值得一看。之後我會將自己的製作過程發出來,讓大家學習一下。 只為了學習, ...
原文鏈接:Create media for automated unattended install of Windows 10
我從來沒看到過像上面的文章一樣這麼詳細的描述過Windows10的無人值守安裝過程,看完長知識了,值得一看。之後我會將自己的製作過程發出來,讓大家學習一下。
只為了學習,如果有侵權請您聯繫我,我會將此文刪除。
推薦:
PowerShell Scripting - Create USB Install Media for Windows 10
Create Windows 10 ISO image from Existing Installation
如果上方的連接無法使用,請下載以下文件,本地查看:
鏈接:https://pan.baidu.com/s/1UrenJjozuH71maaQ9wqHFg
提取碼:zgho
我的測試:
cn_windows_server_2019_x64_dvd_4de40f33的無人值守配置:
下載:
ed2k://|file|cn_windows_server_2019_x64_dvd_4de40f33.iso|5086887936|7DCDDD6B0C60A0D019B6A93D8F2B6D31|/
autounattend.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="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"> <SetupUILanguage> <UILanguage>zh-CN</UILanguage> </SetupUILanguage> <SystemLocale>zh-CN</SystemLocale> <UILanguageFallback>en-US</UILanguageFallback> <UILanguage>zh-CN</UILanguage> <InputLocale>0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{FA550B04-5AD7-411F-A5AC-CA038EC515D7}</InputLocale> <UserLocale>zh-CN</UserLocale> </component> <component name="Microsoft-Windows-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"> <DiskConfiguration> <Disk wcm:action="add"> <CreatePartitions> <CreatePartition wcm:action="add"> <Order>1</Order> <Size>450</Size> <Type>Primary</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Extend>true</Extend> <Order>4</Order> <Type>Primary</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>3</Order> <Size>100</Size> <Type>MSR</Type> </CreatePartition> <CreatePartition wcm:action="add"> <Order>2</Order> <Size>300</Size> <Type>EFI</Type> </CreatePartition> </CreatePartitions> <ModifyPartitions> <ModifyPartition wcm:action="add"> <Order>1</Order> <Label>WinRE</Label> <Format>NTFS</Format> <PartitionID>1</PartitionID> <TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>2</Order> <Format>FAT32</Format> <Label>System</Label> <PartitionID>2</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>4</Order> <Format>NTFS</Format> <Label>Windows</Label> <Letter>C</Letter> <PartitionID>4</PartitionID> </ModifyPartition> <ModifyPartition wcm:action="add"> <Order>3</Order> <PartitionID>3</PartitionID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> <WillWipeDisk>true</WillWipeDisk> </Disk> </DiskConfiguration> <ImageInstall> <OSImage> <InstallTo> <DiskID>0</DiskID> <PartitionID>4</PartitionID> </InstallTo> </OSImage> </ImageInstall> <UserData> <ProductKey> <Key>MFY9F-XBN2F-TYFMP-CCV49-RMYVH</Key> </ProductKey> <AcceptEula>true</AcceptEula> <Organization>FeiQuan</Organization> </UserData> </component> </settings> <cpi:offlineImage cpi:source="wim:e:/system/win/win%20server%202019/cn_windows_server_2019_x64_dvd_4de40f33/sources/install.wim#Windows Server 2019 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>
unattend.xml
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="oobeSystem"> <component name="Microsoft-Windows-International-Core" processorArchitecture="wow64" 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>0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{FA550B04-5AD7-411F-A5AC-CA038EC515D7}</InputLocale> <SystemLocale>zh-CN</SystemLocale> <UILanguage>zh-CN</UILanguage> <UILanguageFallback>en-US</UILanguageFallback> <UserLocale>zh-CN</UserLocale> </component> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="wow64" 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> <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> <HideOnlineAccountScreens>true</HideOnlineAccountScreens> <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> <ProtectYourPC>1</ProtectYourPC> <UnattendEnableRetailDemo>false</UnattendEnableRetailDemo> </OOBE> <UserAccounts> <LocalAccounts> <LocalAccount wcm:action="add"> <Description>Main local admin account</Description> <DisplayName>Admin</DisplayName> <Group>Administrators</Group> <Name>Admin</Name> </LocalAccount> <LocalAccount wcm:action="add"> <Description>Daily standand account</Description> <DisplayName>User</DisplayName> <Group>Users</Group> <Name>Fei</Name> </LocalAccount> </LocalAccounts> </UserAccounts> <RegisteredOrganization>FeiQuan</RegisteredOrganization> <RegisteredOwner>fei</RegisteredOwner> <TimeZone>China Standard Time</TimeZone> </component> </settings> <settings pass="specialize"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <OEMInformation> <Manufacturer>FeiQuan</Manufacturer> <Logo>C:\Windows\System32\oemlogo.bmp</Logo> <SupportHours>24/7</SupportHours> <SupportPhone>+86 184********</SupportPhone> <SupportURL>https://www.cnblogs.com/feiquan/</SupportURL> </OEMInformation> <CopyProfile>true</CopyProfile> <OEMName>FeiQuan</OEMName> <RegisteredOrganization>FeiQuan</RegisteredOrganization> <RegisteredOwner>fei</RegisteredOwner> <TimeZone>China Standard Time</TimeZone> </component> </settings> <cpi:offlineImage cpi:source="wim:e:/system/win/win%20server%202019/cn_windows_server_2019_x64_dvd_4de40f33/sources/install.wim#Windows Server 2019 SERVERSTANDARD" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>
在執行完無人值守的文件後,預設會進入Administrator的賬戶密碼設置界面,設置完成後,就直接可以登錄。
已經內建了,admin與User用戶,首次登錄要自己設置密碼。
我已經自己打包過一個帶有分裝軟體和主題等設置的ISO,可以正常安裝。我就不提供了,你們自己定製吧。
ISO製作(Create Windows 10 ISO image from Existing Installation)5.5部分:
oscdimg -m -o -u2 -udfver102 -bootdata:2#p0,e,b.\iso_files\boot\etfsboot.com#pEF,e,b.\iso_files\efi\microsoft\boot\efisys.bin .\iso_files .\win10Server.iso
通過WDS部署服務的話:按照原文教程(Create media for automated unattended install of Windows 10)製作的話是沒法識別其中的鏡像的,估計因該是這條命令沒加以下參數(紅色加粗部分)吧:
install.wim製作:
dism /capture-image /imagefile:C:\Image\install.wim /capturedir:C:\ /ScratchDir:C:\Scratch /name:"W10Server" /compress:maximum /checkintegrity /verify /bootable /DESCRIPTION:"W10Server" /FLAGS:ServerStandard /DISPLAYNAME:"W10Server" /DISPLAYDESCRIPTION:"W10Server by Feiquan"
我還沒測試,沒時間了,有時間我會測試下的。
我是通過對比install.wim的信息得出的,製作完後,只有name,沒有以下紅色部分,可能不完整:
<NAME>Windows Server 2019 SERVERSTANDARD</NAME> <DESCRIPTION>Windows Server 2019 SERVERSTANDARD</DESCRIPTION> <FLAGS>ServerStandard</FLAGS> <DISPLAYNAME>Windows Server 2019 Standard (桌面體驗)</DISPLAYNAME> <DISPLAYDESCRIPTION>此選項將安裝的完整的 Windows 圖形環境,占用額外的驅動器空間。如果你想要使用 Windows 桌面或需要桌面的應用,則它會很有用。</DISPLAYDESCRIPTION>
通過以下命令查看你製作的install.wim信息:
imagex /info install.wim路徑
有關域中的無人值守看這裡:http://www.07net01.com/storage_networking/WDSer_wurenzhishouanzhuang_488529_1372741620.html?qqdrsign=047