Skip to content
xml-transformer

Unattend.xml

TIP

由于自行构建系统并做好母盘优化有一些难度,我们提供了更为简便的方案

请前往 获取 -> 自行构建最新版潇然系统 查看

  1. 将文件放置到对应目录

  2. 根据系统版本,复制对应的文件内容到一个 Unattend.xml 文件

  3. 将这个 Unattend.xml 文件放置到 C:\Windows\Panther 目录下

如果您能保证您的安装工具纯净,到这一步就可以进行备份了

潇然系统镜像在实际使用中,还会出现被恶意接管的问题,因此我们还会再引入deploy.exe接管部署

如果需要使用deploy.exe接管部署,需要继续完成以下步骤:

  1. 将这个 C:\Windows\Panther\Unattend.xml 文件再复制一份为 C:\Windows\Panther\Unattend1.xml

  2. 将下载到的 deploy.exe 放置到 C:\Windows\System32 目录下

  3. 挂载目标系统注册表

    CMD
    REG.exe LOAD HKLM\Mount_SYSTEM "C:\Windows\System32\config\SYSTEM"
  4. 增加注册表项,替换原来的 oobe\windeploy.exe

    cmd
    REG.exe ADD HKEY_LOCAL_MACHINE\Mount_SYSTEM\Setup /f /v "CmdLine" /t REG_SZ /d deploy.exe
  5. 卸载注册表

    cmd
    REG.exe UNLOAD HKLM\Mount_SYSTEM

最后将系统使用相关工具备份出来即可

WARNING

以下代码中的

xml
        <LogonCommands>
            <AsynchronousCommand wcm:action="add">
                <Description>jinzhuomian</Description>
                <CommandLine>%SystemDrive%\Windows\Setup\Set\osc.exe /S /5</CommandLine>
                <Order>1</Order>
            </AsynchronousCommand>
        </LogonCommands>

均已作废,请自行删除该字段

Windows 8.1-11+ 64位 用 :

xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="generalize">
        <component name="Microsoft-Windows-PnpSysprep" 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">
            <DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices>
            <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
        </component>
    </settings>
    <settings pass="specialize">
        <component name="Microsoft-Windows-Deployment" 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">
            <RunSynchronous>
                <RunSynchronousCommand wcm:action="add">
                    <Order>1</Order>
                    <Description>bushuqian</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /1</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>2</Order>
                    <Description>bushuzhong</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /2</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>3</Order>
                    <Description>bushuhou</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /3</Path>
                </RunSynchronousCommand>
            </RunSynchronous>
        </component>
        <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">
            <ComputerName>*</ComputerName>
            <CopyProfile>true</CopyProfile>
        </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">
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <HideLocalAccountScreen>true</HideLocalAccountScreen>
                <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>3</ProtectYourPC>
                <SkipMachineOOBE>true</SkipMachineOOBE>
                <SkipUserOOBE>true</SkipUserOOBE>
                <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
            </OOBE>
            <RegisteredOrganization>Organization</RegisteredOrganization>
            <RegisteredOwner>User</RegisteredOwner>
            <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <Order>1</Order>
                    <Description>denglushi</Description>
                    <CommandLine>%SystemDrive%\Windows\Setup\Set\osc.exe /S /4</CommandLine>
                </SynchronousCommand>
            </FirstLogonCommands>
            <LogonCommands>
                <AsynchronousCommand wcm:action="add">
                    <Description>jinzhuomian</Description>
                    <CommandLine>%SystemDrive%\Windows\Setup\Set\osc.exe /S /5</CommandLine>
                    <Order>1</Order>
                </AsynchronousCommand>
            </LogonCommands>
        </component>
    </settings>
</unattend>

Windows 8.1-10 32 位用 :

xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="generalize">
        <component name="Microsoft-Windows-PnpSysprep" 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">
            <DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices>
            <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
        </component>
    </settings>
    <settings pass="specialize">
        <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">
                    <Order>1</Order>
                    <Description>bushuqian</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /1</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>2</Order>
                    <Description>bushuzhong</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /2</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>3</Order>
                    <Description>bushuhou</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /3</Path>
                </RunSynchronousCommand>
            </RunSynchronous>
        </component>
        <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">
            <ComputerName>*</ComputerName>
            <CopyProfile>true</CopyProfile>
        </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>
                <HideLocalAccountScreen>true</HideLocalAccountScreen>
                <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>3</ProtectYourPC>
                <SkipMachineOOBE>true</SkipMachineOOBE>
                <SkipUserOOBE>true</SkipUserOOBE>
                <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
            </OOBE>
            <RegisteredOrganization>Organization</RegisteredOrganization>
            <RegisteredOwner>User</RegisteredOwner>
            <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <Order>1</Order>
                    <Description>denglushi</Description>
                    <CommandLine>%SystemDrive%\Windows\Setup\Set\osc.exe /S /4</CommandLine>
                </SynchronousCommand>
            </FirstLogonCommands>
            <LogonCommands>
                <AsynchronousCommand wcm:action="add">
                    <Description>jinzhuomian</Description>
                    <CommandLine>%SystemDrive%\Windows\Setup\Set\osc.exe /S /5</CommandLine>
                    <Order>1</Order>
                </AsynchronousCommand>
            </LogonCommands>
        </component>
    </settings>
</unattend>

Windows 7 64位 用 :

xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="generalize">
        <component name="Microsoft-Windows-PnpSysprep" 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">
            <DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices>
            <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
        </component>
    </settings>
    <settings pass="specialize">
        <component name="Microsoft-Windows-Deployment" 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">
            <RunSynchronous>
                <RunSynchronousCommand wcm:action="add">
                    <Order>1</Order>
                    <Description>bushuqian</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /1</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>2</Order>
                    <Description>bushuzhong</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /2</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>3</Order>
                    <Description>bushuhou</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /3</Path>
                </RunSynchronousCommand>
            </RunSynchronous>
        </component>
        <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">
            <ComputerName>*</ComputerName>
            <CopyProfile>true</CopyProfile>
        </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">
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>3</ProtectYourPC>
                <SkipMachineOOBE>true</SkipMachineOOBE>
                <SkipUserOOBE>true</SkipUserOOBE>
            </OOBE>
            <RegisteredOrganization>Organization</RegisteredOrganization>
            <RegisteredOwner>User</RegisteredOwner>
            <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <Order>1</Order>
                    <Description>denglushi</Description>
                    <CommandLine>%SystemDrive%\Windows\Setup\Set\osc.exe /S /4</CommandLine>
                </SynchronousCommand>
            </FirstLogonCommands>
            <LogonCommands>
                <AsynchronousCommand wcm:action="add">
                    <Description>jinzhuomian</Description>
                    <CommandLine>%SystemDrive%\Windows\Setup\Set\osc.exe /S /5</CommandLine>
                    <Order>1</Order>
                </AsynchronousCommand>
            </LogonCommands>
        </component>
    </settings>
</unattend>

Windows 7 32位 用 :

xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="generalize">
        <component name="Microsoft-Windows-PnpSysprep" 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">
            <DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices>
            <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
        </component>
    </settings>
    <settings pass="specialize">
        <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">
                    <Order>1</Order>
                    <Description>bushuqian</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /1</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>2</Order>
                    <Description>bushuzhong</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /2</Path>
                </RunSynchronousCommand>
                <RunSynchronousCommand wcm:action="add">
                    <Order>3</Order>
                    <Description>bushuhou</Description>
                    <Path>%SystemDrive%\Windows\Setup\Set\osc.exe /S /3</Path>
                </RunSynchronousCommand>
            </RunSynchronous>
        </component>
        <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">
            <ComputerName>*</ComputerName>
            <CopyProfile>true</CopyProfile>
        </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>
                <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>3</ProtectYourPC>
                <SkipMachineOOBE>true</SkipMachineOOBE>
                <SkipUserOOBE>true</SkipUserOOBE>
            </OOBE>
            <RegisteredOrganization>Organization</RegisteredOrganization>
            <RegisteredOwner>User</RegisteredOwner>
            <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <Order>1</Order>
                    <Description>denglushi</Description>
                    <CommandLine>%SystemDrive%\Windows\Setup\Set\osc.exe /S /4</CommandLine>
                </SynchronousCommand>
            </FirstLogonCommands>
            <LogonCommands>
                <AsynchronousCommand wcm:action="add">
                    <Description>jinzhuomian</Description>
                    <CommandLine>%SystemDrive%\Windows\Setup\Set\osc.exe /S /5</CommandLine>
                    <Order>1</Order>
                </AsynchronousCommand>
            </LogonCommands>
        </component>
    </settings>
</unattend>

潇然系统 是 潇然工作室 的主要项目