Autor Beitrag
JackSnake
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: So 28.12.03 01:49 
Hallo,

ich hab folgendes Problem: ich will ein Programm schreiben, das die Pfeile bei Verknüpfungen entfernt. Manuell funktioniert es wunderbar, aber mit dem Programm wird der Wert weder gelöscht noch hinzugefügt.
Weiß jetzt nicht, woran das liegt. Hoffe, ihr könnt mir helfen.

Danke.

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:
33:
34:
35:
36:
37:
38:
39:
implementation

uses Registry;

{$R *.dfm}

//Entfernen
procedure TForm1.Button1Click(Sender: TObject);
const sReg='HKey_Classes_Root';
begin
  with TRegistry.Create do
  try
  RootKey:=HKey_Classes_Root;
  if OpenKey(sReg+'\lnkfile\',True)
  then begin
         DeleteValue('IsShortCut');
         CloseKey;
       end;
  finally;
  Free;
  end;
end;

//Wiederherstellen
procedure TForm1.Button2Click(Sender: TObject);
  const sReg='HKey_Classes_Root';
begin
  with TRegistry.Create do
  try
  RootKey:=HKey_Classes_Root;
  if OpenKey(sReg+'\lnkfile\',True)
  then begin
         WriteString('IsShortCut','');
         CloseKey;
       end;
  finally;
  Free;
  end;
end;


Noch was, weiß jemand, wo das Logo von WindowsXP ist und wie es heißt?

Moderiert von user profile iconUGrohne: Code- durch Delphi-Tags ersetzt
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 28.12.03 12:20 
lass mal bei OpenKey das sReg+ weg und schrieb nur das 'inkfile' rein !

und was für ein Logo meinst du ??

_________________
In the beginning was the word.
And the word was content-type: text/plain.
JackSnake Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: So 28.12.03 18:31 
Wenn man im Kontextmenü von Arbeitsplatz auf Eigenschaft drauf geht, wird doch im Allgemein ein Logo angezeigt. Das meinte ich.
JackSnake Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: So 28.12.03 18:48 
Ja, ist klappt. Ich war in dem falschen Ordner:
HKey_Classes_Root\Hkey_Classes_Root\lnkfile

Es klappt jetzt. Danke.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 29.12.03 12:33 
keine ahnung wo dieses logo gespeichert ist. im zwiefelsfalle mach halt nen screeenshot davon !

_________________
In the beginning was the word.
And the word was content-type: text/plain.