为了确保你能够通过 NTLite 生成的 ISO 进行 系统升级 而不是全新安装,我们需要设置 unattend.xml 文件,避免清除磁盘或格式化操作,并且确保安装过程不触发系统重置。
下面是一个基本的 unattend.xml 示例,用于进行 Windows 升级。这个配置会在安装过程中跳过分区和格式化步骤,同时也避免触发自动化的清理和重置操作。
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="en-US">
<DiskConfiguration>
<Disk>
<WillWipeDisk>false</WillWipeDisk>
<CreatePartitions>
<CreatePartition>
<Order>1</Order>
<Type>Primary</Type>
<Size>10000</Size>
<Label>System Reserved</Label>
<Letter>C</Letter>
<Format>NTFS</Format>
<Active>true</Active>
</CreatePartition>
</CreatePartitions>
</Disk>
</DiskConfiguration>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="en-US">
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="en-US">
<AutoLogon>
<Enabled>true</Enabled>
<Username>Administrator</Username>
<Password>
<Value></Value>
<PlainText>false</PlainText>
</Password>
</AutoLogon>
</component>
</settings>
<settings pass="auditSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="en-US">
<FirstLogonCommands>
<SynchronousCommand>
<CommandLine>cmd /c echo Upgrade Started</CommandLine>
<Order>1</Order>
<Description>Upgrade Script</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>
</unattend>
关键要点:
DiskConfiguration: 在此配置中,
WillWipeDisk设置为false,表示不会清除磁盘上的现有数据。CreatePartitions保持现有分区结构。OOBE设置: 设置了跳过部分用户初始设置(
SkipMachineOOBE和SkipUserOOBE)。这会使得系统进入后续登录界面。自动登录: 配置了自动登录管理员账户,便于完成安装后直接进入桌面。
注意:
映像版本:确保你的
install.wim或 ISO 映像支持升级操作,而不是全新安装。升级条件:你需要确保在执行此升级时,目标计算机的现有版本和安装的映像版本兼容。例如,升级从 Windows 10 1909 到 Windows 10 20H2 或更高版本。
此配置不涉及磁盘清理或格式化,因此你可以使用它进行升级。如果需要针对某个特定版本的操作系统做更详细的调整,可以告诉我。
