Mattias Gaertner schreef:
On Thu, 18 Mar 2010 11:57:14 +0100
Andrea Mauri <[email protected]> wrote:

Il 16/03/2010 20.38, Mattias Gaertner ha scritto:
It uses the function FindDefaultBrowser in unit lcl/lclintf.pas.
I checked FindDefaultBrowserFunction.
I have this problem on win32 (xp).


function FindDefaultBrowser(out ABrowser, AParams: String): Boolean;

function Find(const ShortFilename: String; out ABrowser: String): Boolean; inline;
   begin
     ABrowser := SearchFileInPath(ShortFilename + GetExeExt, '',
                       GetEnvironmentVariableUTF8('PATH'), PathSeparator,
                       [sffDontSearchInBasePath]);
     Result := ABrowser <> '';
   end;

begin
   {$IFDEF MSWindows}
Find('rundll32', ABrowser); <-- this function does not find the browser

The find function looks in PATH, on my pc I have rundll32.exe in windows\system32 but PATH environment variable does not include c:\windows\system32, so find function does not find rundll32

Any windows user out there who knows how to find the right rundll on
all windows platforms?

I don't know, but we could try something like AppendPathDelim(GetEnvironmentVariable('WinDir'))+'system32\rundll.exe' first.

Vincent

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to