Does global declarated "iexplore.exe" exist?

  • Thread starter Thread starter Przemek
  • Start date Start date
P

Przemek

Hi.
I've got a little not typical problem right here.
I would like to open using InternetExplorer ("iexplore.exe") my link from my
application. I do it like that:

System::Diagnostics::Process::Start(S"iexplorer.exe", S"www.wp.pl");

And it works, but problem is - I have to check does "iexplote.exe" (or other
Web Browser) exist. I do it like that:

if(System::IO::File::Exists(S"iexplorer.exe") == true)
{
....
}

and it doesn't work - because "iexplorer.exe" isn't located in local folder
but is declarated as global in system (global example: using CMD check
"iexplorer.exe www.wp.pl" - this page starts correct).

How can I get true/false does this exe file exist, using name of web browser
executable file? ("iexplore.exe" or others execs) declarated as global ?

Good day, thx for wrote.
 
No need to look for Internet Explorer explicitly (unless the page MUST be
run in IE). To open the URL in the machine's default browser, whatever that
may be, just start the URL, as in:

System::Diagnostics::Process::Start("http://www.wp.pl");

If it really needs to be MS's Internet Explorer, you can look in the
registry for the location of the executable. Under HKEY_CLASSES_ROOT, look
in Applications/iexplore.exe/shell/open/command, and parse the
fully-qualified file specification out of the value of the default key.
It'll look something like:

"C:\Program Files\Internet Explorer\iexplore.exe" %1

HTH,
Tom Dacon
Dacon Software Consulting
 
Hi Przemek,

You can find the location of iexplore.exe in the registry under.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE
 
Back
Top