通过搜索看到通过读取注册表HKLM\SYSTEM\ControlSet001\Control\PEBootRamdiskSourceDrive可以获取盘符,但具体不懂怎么操作,请大家帮忙作者: 2012q891052089 时间: 2013-2-17 20:24
wpeinit
@echo off
@color 1F
:: sets bg color to blue, and text to white
set PEBootRamdiskSourceDrive=
for /f "tokens=1-3 delims== " %%a in ('reg.exe query "HKLM\SYSTEM\CurrentControlSet\Control" /v "PEBootRamdiskSourceDrive" 2^>nul') do (
if %%a.==PEBootRamdiskSourceDrive. @set PEBootRamdiskSourceDrive=%%~dc
)
if Defined PEBootRamdiskSourceDrive (
echo PEBootRamdiskSourceDrive is %PEBootRamdiskSourceDrive%
)