Skip to content

Commit

Permalink
增加 外置驱动备份还原接口
Browse files Browse the repository at this point in the history
  • Loading branch information
xrgzs committed May 9, 2024
1 parent 7e5f3f6 commit cbd2960
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
6 changes: 4 additions & 2 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ rem NirCmd v2.86 https://www.nirsoft.net/utils/nircmd.html
curl.exe -sSL https://file.uhsea.com/2403/041d60d1cfc87214b254f75e8381037e80.exe -o osc\apifiles\nircmd.exe || exit
rem https://github.com/M2TeamArchived/NSudo/releases v8.2
curl.exe -sSL https://file.uhsea.com/2403/10fdf98fa1b888327c172e04bb92d762KW.exe -o osc\apifiles\NSudoLC.exe || exit
rem PECMD2012.1.88.05.94Stable-230422 x86 noimd safe
rem DrvIndex_x64-86-v7.23.10.2501
curl.exe -sSL https://file.uhsea.com/2405/4a9868c0a7d8ec8d2ad49dc19f570b87YW.exe -o osc\apifiles\DrvIndex.exe || exit
curl.exe -sSL https://file.uhsea.com/2405/b4c48a2603d841b29501e09de4f1ef14Y6.exe -o osc\apifiles\DrvIndex64.exe || exit
rem PECMD2012.1.88.05.94Stable-230422 x86 x64 noimd safe
curl.exe -sSL https://file.uhsea.com/2404/09632f9544a70ee83fed715a5c8e93b3HU.exe -o osc\apifiles\PECMD.exe || exit
rem PECMD2012.1.88.05.94Stable-230422 x64 noimd safe
curl.exe -sSL https://file.uhsea.com/2404/5415281d7adc574a7ab5bb9be1ff8730HU.exe -o osc\apifiles\PECMD64.exe || exit
rem SystemRestore tool by hp
curl.exe -sSL https://file.uhsea.com/2403/ca1e5c28b2637b556dff75d0043a2504FF.exe -o osc\apifiles\srtool.exe || exit
Expand Down
21 changes: 18 additions & 3 deletions osc/osc.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ title
cd /d "%~dp0"
if exist "%systemdrive%\Windows\SysWOW64\wscript.exe" (
set "PROCESSOR_ARCHITECTURE=AMD64"
move /y "%~dp0apifiles\PECMD64.EXE" "%~dp0apifiles\PECMD.EXE"
move /y "%~dp0apifiles\PECMD64.exe" "%~dp0apifiles\PECMD.exe"
move /y "%~dp0apifiles\DrvIndex64.exe" "%~dp0apifiles\DrvIndex.exe"
)
set aria="%~dp0aria2c.exe" --check-certificate=false --save-not-found=false --always-resume=false --auto-save-interval=10 --auto-file-renaming=false --allow-overwrite=true -c
set dmi="%~dp0apifiles\DMI.exe"
Expand All @@ -14,7 +15,8 @@ set nircmd="%~dp0apifiles\nircmd.exe"
set winput="%~dp0apifiles\winput.exe"
set wbox="%~dp0apifiles\wbox.exe"
set nsudo="%~dp0apifiles\NSudoLC.exe"
set pecmd="%~dp0apifiles\PECMD.EXE"
set pecmd="%~dp0apifiles\PECMD.exe"
set drvindex="%~dp0apifiles\DrvIndex.exe"
set srtool="%~dp0apifiles\srtool.exe"
set wlan="%~dp0apifiles\WLAN.exe"
set zip="%~dp0apifiles\7z.exe"
Expand Down Expand Up @@ -138,7 +140,20 @@ if exist wandrv2.iso (
start "" /wait "%~dp0wandrv2\DriveCleaner.exe" /wandrv
echo wandrv2.iso>>"%systemdrive%\Windows\Setup\xrsysdriverdebug.log"
)

if exist "%SystemDrive%\Windows\Setup\xrsyssearchapi.txt" (
for %%a in (C D E F G H) do (
if exist "%%a:\Xiaoran\OSC\DriverBackup.7z" (
echo [OSC]正在导入搜到的驱动备份%%a:\~\DriverBackup.7z...>"%systemdrive%\Windows\Setup\wallname.txt"
start "" /wait "%drvindex%" -b "%%a:\Xiaoran\OSC\DriverBackup.7z"
)
if exist "%%a:\Xiaoran\OSC\wandrv.iso" (
echo [OSC]正在应用搜到的万能驱动%%a:\~\wandrv.iso...>"%systemdrive%\Windows\Setup\wallname.txt"
copy /y "%~dp0apifiles\DriveCleaner.exe" "%%a:\Xiaoran\OSC\DriveCleaner.exe"
start "" /wait "%%a:\Xiaoran\OSC\DriveCleaner.exe" /wandrv
echo %%a:\Xiaoran\OSC\wandrv.iso>>"%systemdrive%\Windows\Setup\xrsysdriverdebug.log"
)
)
)

:optimize
if exist "optimize\start.bat" (
Expand Down

0 comments on commit cbd2960

Please sign in to comment.