可以啊,比如: var Registry: TRegistry; S: string; begin Registry:=TRegistry.Create; Registry.RootKey:=HKEY_LOCAL_MACHINE; if Registry.OpenKey('\Software\Microsoft\Windows\CurrentVersion\RunOnce', True) then begin Registry.WriteExpandString('AAA', '%PATH%'); if Registry.ValueExists('AAA') then ShowMessage('sfdasd'); end; Registry.Free; end;————————————————————————————————— 宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。 —————————————————————————————————
可以啊,比如: var Registry: TRegistry; S: string; begin Registry:=TRegistry.Create; Registry.RootKey:=HKEY_LOCAL_MACHINE; if Registry.OpenKey('\Software\Microsoft\Windows\CurrentVersion\RunOnce', True) then begin Registry.WriteExpandString('AAA', '%PATH%'); if Registry.ValueExists('AAA') then ShowMessage('sfdasd'); end; Registry.Free; end;————————————————————————————————— 宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。 —————————————————————————————————
var
Registry: TRegistry;
S: string;
begin
Registry:=TRegistry.Create;
Registry.RootKey:=HKEY_LOCAL_MACHINE;
if Registry.OpenKey('\Software\Microsoft\Windows\CurrentVersion\RunOnce', True) then
begin
Registry.WriteExpandString('AAA', '%PATH%');
if Registry.ValueExists('AAA') then ShowMessage('sfdasd');
end;
Registry.Free;
end;—————————————————————————————————
宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
—————————————————————————————————
var
Registry: TRegistry;
S: string;
begin
Registry:=TRegistry.Create;
Registry.RootKey:=HKEY_LOCAL_MACHINE;
if Registry.OpenKey('\Software\Microsoft\Windows\CurrentVersion\RunOnce', True) then
begin
Registry.WriteExpandString('AAA', '%PATH%');
if Registry.ValueExists('AAA') then ShowMessage('sfdasd');
end;
Registry.Free;
end;—————————————————————————————————
宠辱不惊,看庭前花开花落,去留无意;毁誉由人,望天上云卷云舒,聚散任风。
—————————————————————————————————