|
本帖最后由 wuyouaaa 于 2017-6-7 21:42 编辑
其实更严谨的做法是获取HKLM\sys\Select\Current和HKLM\sys\Select\Default的值,分别进行处理,比如
- :win81
- echo ☆☆☆☆☆☆ 正在走Win8流程 导入注册表 ☆☆☆☆☆☆
- echo off
- if not exist L:\boot (bcdboot c:\windows /s L: /l zh-cn)
- bcdedit/store L:\boot\bcd /set {default} path \windows\system32\boot\winload.exe
- bcdedit/store L:\boot\bcd /set {default} osdevice boot
- bcdedit/store L:\boot\bcd /set {default} device boot
- reg load hklm\sys L:\windows\system32\config\system
- FOR /F "tokens=4 delims=x " %%i in ('reg query HKLM\sys\Select /v Current') do call :addRegWin81 %%i
- FOR /F "tokens=4 delims=x " %%i in ('reg query HKLM\sys\Select /v Default') do call :addRegWin81 %%i
- set s=HKLM\system\MountedDevices
- set d=HKLM\sys\MountedDevices
- for /f "tokens=3* delims= " %%a in ('reg query %s% /v \Dosdevices\c:') do (
- reg add %d% /v \Dosdevices\L: /t REG_BINARY /d %%a /f)
- for /f "tokens=3* delims= " %%a in ('reg query %s% /v \Dosdevices\L:') do (
- reg add %d% /v \Dosdevices\c: /t REG_BINARY /d %%a /f)
- reg unload hklm\sys
- goto last
- :addRegWin81
- reg add "HKLM\sys\ControlSet00%1\Services\disk" /f /v "Group" /t REG_SZ /d "SCSI Class"
- reg add "HKLM\sys\ControlSet00%1\Services\volsnap" /f /v "Group" /t REG_SZ /d "SCSI Class"
- reg add "HKLM\sys\ControlSet00%1\Services\FancyRd" /f /v "Group" /t REG_SZ /d "Event Log"
- reg add "HKLM\sys\ControlSet00%1\Services\fvevol" /f /v "Group" /t REG_SZ /d "SCSI Class"
- reg add "HKLM\sys\ControlSet00%1\Services\rdyboost" /f /v "Group" /t REG_SZ /d "SCSI Class"
- reg add "HKLM\sys\ControlSet00%1\Services\uwfvol" /f /v "Group" /t REG_SZ /d "SCSI Class"
- reg add "HKLM\sys\ControlSet00%1\Control\PnP" /f /v "PollBootPartitionTimeout" /t REG_DWORD /d 60000
- exit /B %ERRORLEVEL%
复制代码
注:代码未测试,仅体现逻辑
参考资料:https://blogs.technet.microsoft. ... st-known-good-work/
ps:关于你提到的r驱工具,链接? |
|