Autor Beitrag
MOEDI
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 52



BeitragVerfasst: Mo 31.01.05 19:05 
Noch eine Frage.
Ist es möglich, mein Programm automatisch zu starten, sobald Windows aktiviert wird?

MOEDI
Elite
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 31.01.05 19:06 
Ja. :mrgreen:
FriFra
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Mo 31.01.05 19:07 
Du kannst es z.B. unter HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run eintragen.


@Elite:
Elite hat folgendes geschrieben:
Ja. :mrgreen:

Aber sonst gehts Dir gut? :evil:

_________________
Michael
(principal certified lotus professional - developer)
MOEDI Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 52



BeitragVerfasst: Mo 31.01.05 19:10 
Danke

MOEDI
Elite
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 31.01.05 19:11 
Naja, wollen wirmal nicht so sein:
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:
24:
25:
var
  MyReg:TRegistry;
...
  MyReg:=TRegistry.Create;

  // Als Autostart eintragen
    try
      MyReg.RootKey:=hkey_local_machine;
      MyReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', true);
      MyReg.WriteString('Session-Logger',Application.ExeName);
      MyReg.CloseKey;
    finally
      MyReg.Free;
    end
  
  // Eintrag löschen
    try
      MyReg.RootKey:=hkey_local_machine;
      MyReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', false);
      if MyReg.ValueExists('Session-Logger'then
        MyReg.DeleteValue('Session-Logger');
      MyReg.CloseKey;
    finally
      MyReg.Free;
    end;
MOEDI Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 52



BeitragVerfasst: Mo 31.01.05 19:15 
Na das sieht doch schon recht ordentlich aus :wink:

Danke
mehmeh
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 97

WIN XP
D5 Prof
BeitragVerfasst: Do 25.08.05 11:10 
Hi,
ich habe das bei mir ausprobiert, aber es funktioniert nicht.
Ich bekomme immer die Fehlermeldung: "Fehler beim Setzen der Datein für 'Session-Logger'."
Wo liegt hier der Fehler?
Kann ich als eingeschränkter User, so einen Eintrag in der Registry machen?
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Do 25.08.05 11:17 
user profile iconmehmeh hat folgendes geschrieben:
Kann ich als eingeschränkter User, so einen Eintrag in der Registry machen?


Nein.

AXMD
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Do 25.08.05 11:37 
Da müsstest du statt HKEY_LOCAL_MACHINE einfach HKEY_CURRENT_USER nehmen. Das sollte funktionieren. Allerdings startet das Programm dann auch nur bei diesem einen Benutzer automatisch. ;)