|
本帖最后由 享β亻寸木东 于 2024-3-9 18:13 编辑
qq群:58902001
通用的Unattend.xml无人值守、无人参与、无人应答文件(用命令生成的)。
一个文件搞定各种系统!
默认启用管理员账户,也可以自定义用户名。
Win7、8、10、11,32位64位ARM64都能用。欢迎使用。
复制命令保存到oobe.cmd放到:Windows\Setup\Scripts 文件夹使用,各位大神有更好的建议请多多指教。
- @echo off
- cd /d "%~dp0"
- rem (自定义选项:想用什么账户登录自己修改等号后面,Administrator是管理员账户登录。用其他用户名登录请自己修改,比如"_User_=China")
- @set _User_=Administrator
- whoami | find /i "system" >nul 2>nul
- if not %errorlevel%==0 (echo.&echo 请在部署中使用,稍候自动退出!&choice /t 5 /d y /n >nul&exit)
- if /I %PROCESSOR_ARCHITECTURE%==X86 (set GFD3264=x86)
- if /I %PROCESSOR_ARCHITECTURE%==AMD64 (set GFD3264=amd64)
- if /I %PROCESSOR_ARCHITECTURE%==ARM64 (set GFD3264=arm64)
- if /I %_User_%==Administrator (
- echo ^<?xml version="1.0" encoding="utf-8"?^>>unattend.xml
- echo ^<unattend xmlns="urn:schemas-microsoft-com:unattend"^>>>unattend.xml
- echo ^<settings pass="oobeSystem"^>>>unattend.xml
- echo ^<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="%GFD3264%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"^>>>unattend.xml
- echo ^<OOBE^>>>unattend.xml
- echo ^<SkipMachineOOBE^>true^</SkipMachineOOBE^>>>unattend.xml
- echo ^</OOBE^>>>unattend.xml
- echo ^<AutoLogon^>>>unattend.xml
- echo ^<Username^>Administrator^</Username^>>>unattend.xml
- echo ^<Enabled^>true^</Enabled^>>>unattend.xml
- echo ^</AutoLogon^>>>unattend.xml
- echo ^</component^>>>unattend.xml
- echo ^</settings^>>>unattend.xml
- echo ^</unattend^>>>unattend.xml
- copy %~dp0\unattend.xml %windir%\Panther\unattend.xml /y >nul
- exit
- ) else (
- echo ^<?xml version="1.0" encoding="utf-8"?^>>unattend.xml
- echo ^<unattend xmlns="urn:schemas-microsoft-com:unattend"^>>>unattend.xml
- echo ^<settings pass="oobeSystem"^>>>unattend.xml
- echo ^<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="%GFD3264%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"^>>>unattend.xml
- echo ^<UserAccounts^>>>unattend.xml
- echo ^<LocalAccounts^>>>unattend.xml
- echo ^<LocalAccount wcm:action="add"^>>>unattend.xml
- echo ^<Name^>%_User_%^</Name^>>>unattend.xml
- echo ^<Group^>Administrators^</Group^>>>unattend.xml
- echo ^<Password^>>>unattend.xml
- echo ^<PlainText^>true^</PlainText^>>>unattend.xml
- echo ^<Value /^>>>unattend.xml
- echo ^</Password^>>>unattend.xml
- echo ^</LocalAccount^>>>unattend.xml
- echo ^</LocalAccounts^>>>unattend.xml
- echo ^</UserAccounts^>>>unattend.xml
- echo ^<OOBE^>>>unattend.xml
- echo ^<SkipMachineOOBE^>true^</SkipMachineOOBE^>>>unattend.xml
- echo ^<SkipUserOOBE^>true^</SkipUserOOBE^>>>unattend.xml
- echo ^</OOBE^>>>unattend.xml
- echo ^<AutoLogon^>>>unattend.xml
- echo ^<Password^>>>unattend.xml
- echo ^<Value /^>>>unattend.xml
- echo ^</Password^>>>unattend.xml
- echo ^<Enabled^>true^</Enabled^>>>unattend.xml
- echo ^<LogonCount^>1000000^</LogonCount^>>>unattend.xml
- echo ^<Username^>%_User_%^</Username^>>>unattend.xml
- echo ^</AutoLogon^>>>unattend.xml
- echo ^<FirstLogonCommands^>>>unattend.xml
- echo ^<SynchronousCommand wcm:action="add"^>>>unattend.xml
- echo ^<CommandLine^>net accounts /maxpwage:unlimited^</CommandLine^>>>unattend.xml
- echo ^<Order^>1^</Order^>>>unattend.xml
- echo ^</SynchronousCommand^>>>unattend.xml
- echo ^</FirstLogonCommands^>>>unattend.xml
- echo ^</component^>>>unattend.xml
- echo ^</settings^>>>unattend.xml
- echo ^</unattend^>>>unattend.xml
- copy %~dp0\unattend.xml %windir%\Panther\unattend.xml /y >nul
- exit
- )
复制代码 成品下载地址:https://www.123pan.com/s/8JFRVv-iPhtv.html提取码:1234
成品使用方法,把$OEM$文件夹跟系统(.wim或者.esd的)放一起。用CGI、WinNTSetup……安装系统就行
如图:
其他产品连接:http://bbs.wuyou.net/forum.php?mod=viewthread&tid=432592&extra=
|
评分
-
查看全部评分
|