Hello Lazarus-List, Thursday, March 18, 2010, 6:30:57 PM, you wrote:
>> 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 MG> Any windows user out there who knows how to find the right rundll on MG> all windows platforms? GetSystemDirectory() API: http://msdn.microsoft.com/en-us/library/ms724373%28VS.85%29.aspx But to get the deafult browser the registry must be read as in this doc: http://msdn.microsoft.com/en-us/library/dd203067%28VS.85%29.aspx Browser is at: HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\XXXXXXX\shell\open\command Where XXXXXXXX is the browser name. The one that appears when reading the key HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\ Usually "IEXPLORER.EXE" is the text that you should use instead XXXXXXXX. This is the system wide default browser, but the user could override it in its local profile, so first look for user profile registry: HKEY_CURRENT_USER\SOFTWARE\Clients\StartMenuInternet\ if it gives a name, replace it by XXXXXXXXXX, if not name reported or no key use the system wide defaults. This does not garantees that trying to open an HTML file, in example, will open that browser, because one thing is the browser for internet shortcuts (ALA http://, ftp://) and other is the browser or program associated with HTML files. Usually they match, but not always. -- Best regards, José -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
