Witam ponownie =]
aby dodac program do RUN jest cos takiego:
[code]begin
GetCurrentDirectory(sizeof(Sciezka),Sciezka); //katalog bieżacy
Reg := TRegistry.Create;
try
ShowWindow(Handle,SW_HIDE);
Reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', True);
Reg.WriteString('Media DDV', 'C:\Program Files\Program.exe);
finally
Reg.Free;
end;[/code]
Ale to dadaje klucz do galezi " HKEY_CURRENT_USER " =[
a ja bym chcial dodac do galezi " HKEY_LOCAL_MACHINE " konkretnie do
[code]
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
[/code]
niestety to nie dziala =[ :
[code]
begin
GetCurrentDirectory(sizeof(Sciezka),Sciezka); //katalog bieżacy
Reg := TRegistry.Create;
try
ShowWindow(Handle,SW_HIDE);
Reg.OpenKey('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices', True);
Reg.WriteString('Media DDV', 'C:\Program Files\Program.exe);
finally
Reg.Free;
end;
[/code]