怎么得到注册表里 键值名为 '(默认)' 的键值啊??(200分)

G

gf.z

Unregistered / Unconfirmed
GUEST, unregistred user!
好想用readstring()读不出来啊!!!
如:
HKEY_LOCAL_MACHINE/(默认) aaa
如何得到aaa
 
reg.rootkey := HKEY_LOCAL_MACHINE;
try
if reg.openreadonly('/') then
s:=reg.readstring('默认');
finally
reg.free;
end;
 
如果是HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run
下呢??
 
with reg do
begin
rootkey := HKEY_LOCAL_MACHINE;
if openkey('/Software/Microsoft/Windows/CurrentVersion/Run', false) then
begin
s := readstring('默认');
end;
free;
end;
 
MyReg:=Tregistry.creat;
with MyReg do
begin
rootkey:=HKEY_LOCAL_MACHINE;
if openkey('/Software/Microsoft/Windows/CurrentVersion/Run',true) then
begin
buffer:=readstring( '');(注意,在'' 中间什么都不要加就是默认值)
closekey();
end;
end;
 
怪不得我的不到值!!我去试试!!谢谢!!!
回来给你加分!!
 
同意浮生。
 
什么都不写就是默认的
唉, 来晚了
 
接受答案了.
 
顶部