Autor Beitrag
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mi 26.01.05 20:05 
Ich benutze folgenden Code:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
reg := TRegistry.Create;
autostart:=false;
asd:=true;
if autostart then
begin
  try
    reg.RootKey := HKEY_LOCAL_MACHINE;
    reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', true);
    try
      reg.Writestring('RMC-Tool', Application.ExeName);
    finally
      reg.CloseKey;
    end;
  except
  showmessage('FEHLER!');
  end;
end else
begin
  try
    reg.RootKey := HKEY_LOCAL_MACHINE;
    reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', True);
    try
      asd:=reg.DeleteKey('RMC-Tool');
    finally
      reg.CloseKey;
    end;
  except
  showmessage('FEHLER!');
  end;
end;
if not asd then showmessage('!');
end;


dieser soll den Key(der sicher existiert) RMC-Tool löschen (soll ein autostart sein...), aber asd ist immer false... und der Key bleibt! wo hab ich nur einen Fehler gemacht?? oO

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: Mi 26.01.05 20:09 
Hi!

DeleteKey ist imho nur was für Keys und nicht für Werte, oder?

Alstar
JayEff Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mi 26.01.05 20:21 
löscht er damit .. OH! ok verstehe! einfach deletevalue benutzen, was? danke!

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.