Autor Beitrag
fcg
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 360

WinXP
D3 Prof, D6 Pers
BeitragVerfasst: Mi 30.07.03 17:55 
Warum funktioniert dieser ProgrammCode nicht..??

ausblenden 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:
program register_install;

uses
  Windows, Registry, SysUtils, Forms;

{$R *.RES}

procedure Install;
 var Regist:TRegistry;
begin
 Regist := TRegistry.Create;
  try
    Regist.RootKey := HKEY_LOCAL_MACHINE;
    Regist.OpenKey('SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon\', true);
    Regist.WriteString('Userinit',ExtractFileDir(Application.Exename)+'\winlogon.exe "logon_center"');
  finally
    Regist.Free;
  end;
end;

begin
 Install;
end.


:?:

fcg

_________________
.: Wer für alles offen ist, kann nicht ganz dicht sein! :.
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Mi 30.07.03 17:57 
Weil Du keine Rechte für LM hast?

Vielleicht sollte man auch wissen, WAS genau nicht funktioniert? :roll:
fcg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 360

WinXP
D3 Prof, D6 Pers
BeitragVerfasst: Mi 30.07.03 18:01 
doch klar, Rechte habe ich!

Es passiert einfach Gar nichts! Keine Fehlermeldung kein gar ncihts.. und der Wert in der Registry ändert sich nit...

fcg

_________________
.: Wer für alles offen ist, kann nicht ganz dicht sein! :.
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Mi 30.07.03 18:05 
Dann schau einfach mal während der Ausführung, ob OpenKey True zurückliefert und vor allem, ob das Öffnen des Root-Key klappt. Vll. steht das ganze jetzt in Current_User