星期一, 9月 15, 2008

CoreBoot系統改讀其路徑


uses Registry;

Function GetCoreBootValue : string;
var
reg:TRegistry;
skey : string;
begin
Result := '';
reg:=TRegistry.create;
try
reg.RootKey:=HKEY_LOCAL_MACHINE;
skey:='SYSTEM\CurrentControlSet\Services\Coreboot';
if reg.OpenKeyReadOnly(skey) then
begin
if(reg.ValueExists('CorebootEnable')) then
begin
if (reg.ReadInteger('CorebootEnable')=1) and (reg.ValueExists('CorebootDrive')) then
Result:=Trim(reg.ReadString('CorebootDrive'));
end;
reg.closekey;
end;
finally
reg.free;
end;
end;

沒有留言: