测试环境,当前目录下有DriversVIA Serial ATA Controller - 3149文件夹
代码:
@echo off
if not exist c:\reg md c:\reg
for /f "delims=" %%a in ('dir/b/s/ad *Serial ATA *') do set "folderpath=%%a"
for %%a in (%folderpath%\*.sys) do (
set/a n+=1
call reg export "hklm\system\currentcontrolset\services\%%~na" c:\reg\%%n%%.reg
)
start c:\reg\
D:\BoJoneBackup>set "folderpath=D:\BoJoneBackup\Desktop\SeaVoyage3DScreensaver\S
ea Voyage 3D Screensaver\App\Data"
D:\BoJoneBackup>set "folderpath=D:\BoJoneBackup\Desktop\SeaVoyage3DScreensaver\S
ea Voyage 3D Screensaver\App\Data\catalog"
D:\BoJoneBackup>for %a in ("D:\BoJoneBackup\Desktop\SeaVoyage3DScreensaver\Sea V
oyage 3D Screensaver\App\Data\catalog\*.sys") do (
set/a n+=1
call reg export "hklm\system\currentcontrolset\services\%~na" c:\reg\%n%.reg
)