Autor Beitrag
starsurfer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: Mo 01.05.06 20:08 
Ich hab mir meinen eigenen Editor geschreiben und möchte jetzt den Standart Windows Editor ersetzen, so das mein Programm gestartet wird wenn man Dateien öffnet die mit dem "normalen" Editor geöffnet wurden....

Wo muss ich da was ändern?

EXE ersetzen kommt nicht in Frage da ich es ermöglichen will das der "normale" Editor wieder als Standart gesetzt wird.

_________________
GEIZ IST GEIL! - Ihr Sozialamt
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 01.05.06 20:15 
Einfach eigenes Programm mit den gewünschten Endungen verknüpfen.

_________________
Markus Kinzler.
starsurfer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: Mo 01.05.06 20:18 
mmmh hab vll ein bisschen unglücklich formuliert...

ich möchte das nicht per Hand machen, ich möchte in meinem Programm wo hin klicken und der soll sich selber eintragen bzw austragen....

_________________
GEIZ IST GEIL! - Ihr Sozialamt
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 01.05.06 20:20 
Die Verknüpfungen stehen in der Registry, du kannst sie also auch per Programm setzen.

_________________
Markus Kinzler.
starsurfer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: Mo 01.05.06 20:24 
nur wo steht sie in der registroy ?

_________________
GEIZ IST GEIL! - Ihr Sozialamt
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 01.05.06 20:26 
HKEY_CLASSES_ROOT

_________________
Markus Kinzler.
starsurfer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: Mo 01.05.06 20:33 
gut, hab jetzt

HKEY_CLASSES_ROOT\.txt
gefunden, aber da steht nirgendwo ne Pfad Angabe von dem Programm mit dem es garde verknüpft ist...

auch nicht in:
HKEY_CLASSES_ROOT\.txt\PersistentHandler
HKEY_CLASSES_ROOT\.txt\SheelNew


welches dieser Einträge muss ich verändern um mein Programm zu verknüpfen ?

_________________
GEIZ IST GEIL! - Ihr Sozialamt
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 01.05.06 20:47 
Bei der Verknupfung steht unter [Standard] ein datetyp ( .txt: txtfile)
Unter diesem stehen dann die Verknüpfungen ( txtfile: OPEN->Command->%SystemRoot%\system32\NOTEPAD.EXE %1

_________________
Markus Kinzler.
starsurfer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: Di 02.05.06 13:05 
ich find da keinen Eintrag mit ner Pfad Angabe :nixweiss:
siehe Bilder:
Einloggen, um Attachments anzusehen!
_________________
GEIZ IST GEIL! - Ihr Sozialamt
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 02.05.06 13:11 
Wie gesagt Verknüpfung steht bei Dateityp ( hier txtfile).

_________________
Markus Kinzler.
starsurfer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: Di 02.05.06 13:20 
ich hab mein Programm jetzt mal manuell als standart Programm für txt Datein eingetragen(extra->ordneroptionen->Dateiendungen....), es hat sich an den registry Einträgen rein gar nix verändert....

auch wenn ich auf:

"HKEY_CLASSES_ROOT\.txt -> Standart:Wert txtfile -> Ändern" gehen,kommt keine Pfadangabe


ich werd noch blöd :autsch:

(ich hab windows XP- liegts da vll wo anderst?)

_________________
GEIZ IST GEIL! - Ihr Sozialamt
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 02.05.06 13:29 
Sxhau mal meinen Beitrag ein bischen weiter oben, da steht alles-
Einloggen, um Attachments anzusehen!
_________________
Markus Kinzler.
starsurfer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: Di 02.05.06 13:37 
ahhhh gut jetzt habsch den Eintrag gefunden.....
na wenn man bei ".txt" statt "txtfile" sucht kann man ja nix finden
wer lesen kann ist klar im Vorteil :roll:
thx für deine Geduld

_________________
GEIZ IST GEIL! - Ihr Sozialamt
Watsch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 97

Win98 SE
D3 Prof, D4 C/S
BeitragVerfasst: Di 02.05.06 13:41 
Ich hab zwar nicht Win XP (sondern nur Win 98 ), aber ich hatte es damals folgendermaßen gelöst:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
uses... Registry;

procedure TFormVerknuepfungen.Button1Click(Sender: TObject);
var
  NfoRegistry: TRegistry;
begin
  If FlatCheckBoxNFO.Checked = True Then
    begin
    NfoRegistry := TRegistry.Create;
    NfoRegistry.RootKey := HKEY_CLASSES_ROOT;
    NfoRegistry.OpenKey('.nfo', True);
    NfoRegistry.WriteString('', 'NFO-Datei');
    NfoRegistry.CloseKey;

    NfoRegistry.OpenKey('NFO-Datei\shell\open\command', True);
    NfoRegistry.WriteString('', '' + ExeName + ' %1');
    NfoRegistry.CloseKey;
    NfoRegistry.Free;
    end;
end;


Damit aber bei einem Doppelklick auf die Datei nicht nur mein Programm gestartet, sondern die Datei auch geladen wird:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TFormMain.FormActivate(Sender: TObject);
var
  DateiErweiterung: String;
begin
  If ParamCount > 0 Then
    begin
    DateiErweiterung := ExtractFileExt(ParamStr(1));
    If (DateiErweiterung = UpperCase('.NFO')) OR (DateiErweiterung = UpperCase('.DIZ')) Then
      begin
      RichEdit.Lines.LoadFromFile(ParamStr(1)); 
      end;
end;


MfG ... Watsch

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt
starsurfer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 334

Win 95, Win 98, Win XP, Win Vista, Linux
D5 Enterprise ,D2005, D6 Personal, Visual C++ Express 2005, C++ Builder 6 E, Dev-C++
BeitragVerfasst: Di 02.05.06 15:00 
Also ich kann jetzt den Registry Schlüssel setzen(und wieder zurücksetzen)...
Ergebnis:
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:
procedure TForm1.Standarteditor1Click(Sender: TObject);
var txtRegistry: TRegistry;
    pfad:string;
    config:tinifile;
begin
if standarteditor1.Checked=true then
   begin
   standarteditor1.Checked:=false;
   txtRegistry := TRegistry.Create;
   txtRegistry.RootKey := HKEY_CLASSES_ROOT;
   txtRegistry.OpenKey('txtfile\shell\open\command', True);
   config:=tinifile.Create(extractfilepath(application.exename)+'config.ini');
   config.WriteBool('Registry','se',false);
   pfad:=config.ReadString('Registry','old_path','');
   config.WriteString('Registry','old_path','');
   config.free;
   txtregistry.WriteexpandString('',pfad);
   txtRegistry.CloseKey;
   txtRegistry.Free;
   end
    else
   begin
   standarteditor1.Checked:=true;
   txtRegistry := TRegistry.Create;
   txtRegistry.RootKey := HKEY_CLASSES_ROOT;
   txtRegistry.OpenKey('txtfile\shell\open\command', True);
   pfad:=txtregistry.ReadString('');
   txtregistry.WriteString('',application.exename);
   config:=tinifile.Create(extractfilepath(application.exename)+'config.ini');
   config.WriteBool('Registry','se',true);
   config.WriteString('Registry','old_path',pfad);
   config.free;
   txtRegistry.WriteExpandString('',application.exename+' "%1"');
   txtRegistry.CloseKey;
   txtRegistry.Free;
   end;
end;


mein Programm startet auch wenns gesetzt ist, aber
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TFormMain.FormActivate(Sender: TObject);  
var  
  DateiErweiterung: String;  
begin  
  If ParamCount > 0 Then  
    begin  
    DateiErweiterung := ExtractFileExt(ParamStr(1));  
    If (DateiErweiterung = UpperCase('.NFO')) OR (DateiErweiterung = UpperCase('.DIZ')) Then  
      begin  
      RichEdit.Lines.LoadFromFile( ParamStr(1) );   
      end;  
end;


so, die Version funzt jetzt star

_________________
GEIZ IST GEIL! - Ihr Sozialamt