无忧启动论坛

标题: 这2个批处理怎么合并在一起SetupComplete.cmd [打印本页]

作者: wuming520    时间: 2021-11-12 12:18
标题: 这2个批处理怎么合并在一起SetupComplete.cmd
这2个批处理怎么合并在一起SetupComplete.cmd
@echo off
echo. & echo * 驱动安装正在进行(请勿关闭本窗口) *

IF EXIST "%SystemRoot%\WanDrv\WanDrv.exe" (
start /wait %SystemRoot%\WanDrv\WanDrv.exe /FA
)
cls
IF EXIST "%SystemRoot%\WanDrv" (
rd /f /q %SystemRoot%\WanDrv
)
cls
IF EXIST "%systemdrive%\Drivers" (
rd /q /s %systemdrive%\Drivers
)
cls
rd /s /q %Windir%\Setup\Scripts 1>nul 2>nul

del%0

-----------------------------------------------------------------分割线上面1下面2
@echo off
IF EXIST C:\SWTOOLS RD /Q /S C:\SWTOOLS
IF EXIST "%Systemroot%\Setup\OEMFILES" RD /Q /S %Systemroot%\Setup\OEMFILES
IF EXIST "%Systemroot%\Setup\AIDA64" RD /Q /S %Systemroot%\Setup\AIDA64
IF EXIST "%SYSTEMDRIVE%\AIDA64 REPORTS" RD /Q /S "%SYSTEMDRIVE%\AIDA64 REPORTS"
IF EXIST "%SYSTEMDRIVE%\DRV64" RD /Q /S "%SYSTEMDRIVE%\DRV64"
IF EXIST "%SYSTEMDRIVE%\DRV32" RD /Q /S "%SYSTEMDRIVE%\DRV32"
IF EXIST "%SYSTEMDRIVE%\DRV" RD /Q /S "%SYSTEMDRIVE%\DRV"
IF EXIST "%WINDIR%\System32\DepX64.exe" del /f /q "%WINDIR%\System32\DepX64.exe"
IF EXIST "%WINDIR%\System32\DepX86.exe" del /f /q "%WINDIR%\System32\DepX86.exe"

START /WAIT /B cscript /file:///C:\Users\Administrator\AppData\Roaming\Tencent\QQTempSys\OOY5$4OW5H`8`9%(9$)T67M.giflogo %Systemroot%\system32\slmgr.vbs -xpr | findstr /I "计算机已永久激活" && GOTO ENDALL
START /WAIT /B cscript /file:///C:\Users\Administrator\AppData\Roaming\Tencent\QQTempSys\OOY5$4OW5H`8`9%(9$)T67M.giflogo %SYSTEMROOT%\system32\slmgr.vbs -xpr | findstr /I "The machine is permanently activated" && GOTO ENDALL

WMIC PARTITION | findstr /i "GPT"
IF NOT ERRORLEVEL 1 GOTO GPT

%~dp0"Windows Loader.exe" /silent /preactivate
cd %~dp0
attrib -R -A -S -H *.*
SHUTDOWN /R /T 6
RMDIR /S /Q "%WINDIR%\Setup\Scripts"
exit

:GPT
START /WAIT /MIN %~dp0"efi.cmd"
cd %~dp0
attrib -R -A -S -H *.*
SHUTDOWN /R /T 6
RMDIR /S /Q "%WINDIR%\Setup\Scripts"
exit

:ENDALL
cd %~dp0
attrib -R -A -S -H *.*
RMDIR /S /Q "%WINDIR%\Setup\Scripts"
exit
合并在一起保存为SetupComplete.cmd

作者: 2012jiashanni    时间: 2021-11-12 12:31
@echo off
echo. & echo * 驱动安装正在进行(请勿关闭本窗口) *

IF EXIST "%SystemRoot%\WanDrv\WanDrv.exe" (
start /wait %SystemRoot%\WanDrv\WanDrv.exe /FA
)
cls
IF EXIST "%SystemRoot%\WanDrv" (
rd /f /q %SystemRoot%\WanDrv
)
cls
IF EXIST "%systemdrive%\Drivers" (
rd /q /s %systemdrive%\Drivers
)
cls
IF EXIST C:\SWTOOLS RD /Q /S C:\SWTOOLS
IF EXIST "%Systemroot%\Setup\OEMFILES" RD /Q /S %Systemroot%\Setup\OEMFILES
IF EXIST "%Systemroot%\Setup\AIDA64" RD /Q /S %Systemroot%\Setup\AIDA64
IF EXIST "%SYSTEMDRIVE%\AIDA64 REPORTS" RD /Q /S "%SYSTEMDRIVE%\AIDA64 REPORTS"
IF EXIST "%SYSTEMDRIVE%\DRV64" RD /Q /S "%SYSTEMDRIVE%\DRV64"
IF EXIST "%SYSTEMDRIVE%\DRV32" RD /Q /S "%SYSTEMDRIVE%\DRV32"
IF EXIST "%SYSTEMDRIVE%\DRV" RD /Q /S "%SYSTEMDRIVE%\DRV"
IF EXIST "%WINDIR%\System32\DepX64.exe" del /f /q "%WINDIR%\System32\DepX64.exe"
IF EXIST "%WINDIR%\System32\DepX86.exe" del /f /q "%WINDIR%\System32\DepX86.exe"

START /WAIT /B cscript /file:///C:\Users\Administrator\AppData\Roaming\Tencent\QQTempSys\OOY5$4OW5H`8`9%(9$)T67M.giflogo %Systemroot%\system32\slmgr.vbs -xpr | findstr /I "计算机已永久激活" && GOTO ENDALL
START /WAIT /B cscript /file:///C:\Users\Administrator\AppData\Roaming\Tencent\QQTempSys\OOY5$4OW5H`8`9%(9$)T67M.giflogo %SYSTEMROOT%\system32\slmgr.vbs -xpr | findstr /I "The machine is permanently activated" && GOTO ENDALL

WMIC PARTITION | findstr /i "GPT"
IF NOT ERRORLEVEL 1 GOTO GPT

%~dp0"Windows Loader.exe" /silent /preactivate
cd %~dp0
attrib -R -A -S -H *.*
SHUTDOWN /R /T 6
RMDIR /S /Q "%WINDIR%\Setup\Scripts"
exit

:GPT
START /WAIT /MIN %~dp0"efi.cmd"
cd %~dp0
attrib -R -A -S -H *.*
SHUTDOWN /R /T 6
RMDIR /S /Q "%WINDIR%\Setup\Scripts"
exit

:ENDALL
cd %~dp0
attrib -R -A -S -H *.*
RMDIR /S /Q "%WINDIR%\Setup\Scripts"
del%0
exit
作者: wuming520    时间: 2021-11-12 16:36
2012jiashanni 发表于 2021-11-12 12:31
@echo off
echo. & echo * 驱动安装正在进行(请勿关闭本窗口) *

我来看看谢谢实体机测试一下
作者: wuming520    时间: 2021-11-12 17:05
wuming520 发表于 2021-11-12 16:36
我来看看谢谢实体机测试一下

       @echo off
echo. & echo     *   驱动安装正在进行(请勿关闭本窗口)   *

if exist %SystemRoot%\Setup\Scripts\YH.reg regedit /s %SystemRoot%\Setup\Scripts\YH.reg
start /wait %SystemRoot%\Setup\Scripts\123.exe /A
start /wait %SystemRoot%\system\OOBE.CMD
rd /s /q %Windir%\Setup\Scripts 1>nul 2>nul
DEL /F /Q %windir%\Panther\unattend.xml >nul
RD /Q /S %windir%\Panther >nul

del%0                                                     -----------------------------------------------------------------分割线上面1下面2                 @echo off

IF EXIST C:\SWTOOLS RD /Q /S C:\SWTOOLS   
IF EXIST "%Systemroot%\Setup\OEMFILES" RD /Q /S %Systemroot%\Setup\OEMFILES
IF EXIST "%Systemroot%\Setup\AIDA64" RD /Q /S %Systemroot%\Setup\AIDA64
IF EXIST "%SYSTEMDRIVE%\AIDA64 REPORTS" RD /Q /S "%SYSTEMDRIVE%\AIDA64 REPORTS"
IF EXIST "%SYSTEMDRIVE%\DRV64" RD /Q /S "%SYSTEMDRIVE%\DRV64"
IF EXIST "%SYSTEMDRIVE%\DRV32" RD /Q /S "%SYSTEMDRIVE%\DRV32"
IF EXIST "%SYSTEMDRIVE%\DRV" RD /Q /S "%SYSTEMDRIVE%\DRV"
IF EXIST "%WINDIR%\System32\DepX64.exe" del /f /q "%WINDIR%\System32\DepX64.exe"
IF EXIST "%WINDIR%\System32\DepX86.exe" del /f /q "%WINDIR%\System32\DepX86.exe"

START /WAIT /B cscript /logo %Systemroot%\system32\slmgr.vbs -xpr | findstr /I "计算机已永久激活" && GOTO ENDALL
START /WAIT /B cscript /logo %SYSTEMROOT%\system32\slmgr.vbs -xpr | findstr /I "The machine is permanently activated" && GOTO ENDALL

WMIC PARTITION | findstr /i "GPT"
IF NOT ERRORLEVEL 1 GOTO GPT

%~dp0"Windows Loader.exe" /silent /preactivate
cd %~dp0
attrib -R -A -S -H *.*
SHUTDOWN /R /T 6
RMDIR /S /Q "%WINDIR%\Setup\Scripts"
exit

:GPT
START /WAIT /MIN %~dp0"efi.cmd"
cd %~dp0
attrib -R -A -S -H *.*
SHUTDOWN /R /T 6
RMDIR /S /Q "%WINDIR%\Setup\Scripts"
exit

:ENDALL
cd %~dp0
attrib -R -A -S -H *.*
RMDIR /S /Q "%WINDIR%\Setup\Scripts"
exit                                                                                                                                                把里面Windows Loader.exe换成123.exe /A合并在一起保存为SetupComplete.cmd




欢迎光临 无忧启动论坛 (http://bbs.c3.wuyou.net/) Powered by Discuz! X3.3