Autor Beitrag
Amiga-Fan
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 534



BeitragVerfasst: Fr 13.05.05 18:16 
in meinem Programm habe ich einen Browser integriert. Auswählbar ist Internet Explorer und Mozilla. Für Mozilla muß man das Mozilla Control runterladen und installieren. Angenommen man hat Mozilla ausgewählt, das Control ist aber nicht installiert, wie frage ich das vernünftig ab?
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Fr 13.05.05 18:21 
du könntest in der registry unter HKLM\software\mozilla oder so nachschauen
oder im Uninstall zweig... steht auch ir´gendwo unter HKLM\software

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Amiga-Fan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 534



BeitragVerfasst: Fr 13.05.05 18:22 
habe ich vorhin auch dran gedacht, aber lieber wäre mir eine andere Lösung. Diese Registry-Einträge können sich ja auch schon mal ändern...
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Fr 13.05.05 18:23 
ne, das control steht immer am gleichen ort. ausser andre versionsnummer, dann musst du halt nach dem richtigen substring suchen

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Amiga-Fan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 534



BeitragVerfasst: Fr 13.05.05 18:27 
bleiben denn nicht nach dem deinstallieren des Controls die Registry-Werte stehen? Ich versuchs mal....
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Fr 13.05.05 18:31 
falls ja, hätte das deinstallationsprogramm nen schlechten job gemacht ^^

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Amiga-Fan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 534



BeitragVerfasst: Fr 13.05.05 19:15 
ich habe es jetzt über try except gemacht:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
  try
    TestMozillaBrowser:=TMozillaBrowser.create(self);
    MozillaVerfuegbar:=true;
  except
    TestMozillaBrowser.Free;
    MozillaVerfuegbar:=false;
  end;


IMHO ist das am sichersten.
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Fr 13.05.05 19:17 
user profile iconAmiga-Fan hat folgendes geschrieben:
ich habe es jetzt über try except gemacht
IMHO ist das am sichersten.

und am einfachsten :lol:

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Martin77
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 282

XP Prof
D6 Prof, D7 Personal, D7 Enterprise, D8 personal
BeitragVerfasst: Fr 13.05.05 22:15 
Habe gerade leider keinen Source da um es zu testen:
Glaube bei meiner Excel OLE Steuerung knallte es bei TestMozillaBrowser.Free;
Glaube das Objeckt war garnicht da.

Kann mir sowas vorstellen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
  try
    TestMozillaBrowser:=TMozillaBrowser.create(self);
    MozillaVerfuegbar:=true;
  except
    MozillaVerfuegbar:=false;
  end;
  if MozillaverFuegbar then
    TestMozillaBrowser.Free;
Amiga-Fan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 534



BeitragVerfasst: Fr 13.05.05 23:43 
brauchst du das auch grad zufällig?

genaugenommen habe ich es nun so gemacht:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
  try
    TestMozillaBrowser:=TMozillaBrowser.create(self);
    MozillaVerfuegbar:=true;
  except
    MozillaVerfuegbar:=false;
  end;

  try
    if MozillaVerfuegbar then
      if assigned(TestMozillaBrowser) then
        TestMozillaBrowser.Free;
  except
  end;


aber dein Code geht auch.

_________________
- Leg dich nie mit einem Berufsprogrammierer an
- Wahre Profis akzeptieren keine einfachen Lösungen
Martin77
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 282

XP Prof
D6 Prof, D7 Personal, D7 Enterprise, D8 personal
BeitragVerfasst: Sa 14.05.05 05:40 
Nein. hatte nur mit Excel damals das gleiche Problem.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
 try
    TestMozillaBrowser:=TMozillaBrowser.create(self);
    MozillaVerfuegbar:=true;
    if assigned(TestMozillaBrowser) then
      TestMozillaBrowser.Free;
  except
    MozillaVerfuegbar:=false;
  end;

  end;


So hatte uch es mit Excel gelöst (auf dein Beispiel abgeändert)