
CODE: [Copy to clipboard]不知道你要把这些目录写到注册表的什么地方?@ECHO OFF
set path1=%SystemRoot%\Drivers\
for /f "delims=" %%i in ('dir/ad/b %systemroot%\system32\drivers') do (
reg add "HKCU\SoftWare\Microsoft\..." /d %path1%%%i)
CODE: [Copy to clipboard]@ECHO OFF
set path1=%SystemRoot%\system32\Drivers\
for /f "delims=" %%i in ('dir/ad/b %path1%') do (
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\DevicePath" /V %%i /t REG_SZ /d %path1%\%%i)
CODE: [Copy to clipboard]问题解决了@ECHO OFF&&setlocal enabledelayedexpansion
set path1=%SystemRoot%\system32\Drivers\
for /f "delims=" %%i in ('dir/ad/b/s %path1%') do (
set all_path=!all_path!;%%i
)
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\DevicePath" /V devpath /t REG_SZ /d %all_path%
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |