Borut Maricic wrote:
On 2006-05-21 at 10:32,
Mattias Gaertner ([EMAIL PROTECTED]) wrote:

procedure GetDefaultBrowser(var Browser, Params: string);
begin
  Browser:= SearchFileInPath('rundll32.exe','',
                           SysUtils.GetEnvironmentVariable('PATH'),';',
                           [sffDontSearchInBasePath]);
  Params:='url.dll,FileProtocolHandler %s';
end;


This is called by the IDE via OnFindDefaultBrowser. This is not part of the
viewer component itself.
I added that.


Thank you. It was really a fast change! Yup, I can confirm
that it is working now under WinXP.

Regarding my own comments:

BTW, it also seems that a call to
SysUtils.GetEnvironmentVariable('any sysvar name here') is
always returning an empty string. Can that be or am I making
a fool of myself here?

Oooops, this seems to work now (I have made a SVN update in
the meantime). Strange.


This seems to be introduced through a debugger itself.
While debugging, the environment variables are sometimes
accessed ok and sometimes no. Out of the IDE and apparently
in the IDE, but w/o debugging, it works every time. Maybe it
has to do with the debugger I have installed - I used the
link http://prdownloads.sourceforge.net/mingw/gdb-6.0-20031011.exe
since I could not find any link to a newer Win32-ready gdb
exe. Any suggestions, perhaps?


http://www.freepascal.org/mantis/view.php?id=1685

Vincent

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to