Autor Beitrag
G-man
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 258

Win 2000, Win ME, SuSE 8.2
D5 Standard, D6 Professional
BeitragVerfasst: Di 19.08.03 15:39 
Weiss jemand, wie man das eigene Programm auf Knopfdruck
in den Autostart schieben kann und auf Wunsch dann auch wieder raus
kriegt???

_________________
...To err is human, but to really foul things up requires a computer.
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Di 19.08.03 15:45 
Am besten schreibst du es in die Registrierung:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Reg := TRegistry.Create;
  with Reg do
    try
      RootKey := HKEY_CURRENT_USER;
      if (OpenKey('Software\Microsoft\Windows\CurrentVersion\Run\', false)) then
        begin
          WriteString('Name''Pfad+Dateiname');
          CloseKey;
        end;
    finally
      Free;
  end;


Dann kannst du diesen Schlüssel auch einfach wieder löschen.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 20.08.03 01:22 
Mir persönlich wäre es lieber, er würde es in meinen Autostart-Ordner schreiben, anstatt in der Registry verstecken.
DaFox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 189



BeitragVerfasst: Mi 20.08.03 01:43 
Hi!

Luckie hat folgendes geschrieben:
Mir persönlich wäre es lieber, er würde es in meinen Autostart-Ordner schreiben, anstatt in der Registry verstecken.


Dito. Suche in: Delphi-Forum, Delphi-Library CSIDL_STARTUP bzw. Suche in: Delphi-Forum, Delphi-Library CSIDL_COMMON_STARTUP

Gruß,
Markus