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;