Calling IExplore.exe from Progress Program

rick.souza

New Member
Hi, all!

I need to call Internet Explorer from within a Progress Program in order to open an HTML file. For this I use PROCEDURE WinExec EXTERNAL "kernel32.dll". It works fine meanwhile, I have to inform the directory with the application name via parameter for the procedure.
Exemple:
assign c-aplic-iexplore = "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
c-html-file = "AnyFile.HTML").

run winexec (input c-aplic-iexplore + chr(32) + c-arquivo-html, input 1, output i-return-exec).

The problem is that this way I assume that in all stations the application is in the same directory, what cannot be true.

Is there a way to search for the application IEXPLORE.EXE and to get its directory?

I tried to use the GET-KEY-VALUE meawhile it reads the .INI file and not the REGISTRY.

Please, any help would be appreciated.

Cordially,

Ricardo Souza (ricardo.souza@mail.com).
 
Rick

Can't help regarding your specific questions but had a similar problem and to solve found this single line of code works:

OS-COMMAND NO-WAIT "iexplore" VALUE('"' + c-html-file + '"').

This seems to work even if Internet Explorer is not in C:\Program Files\Internet Explorer\ but I don't know if it is any help for your situation.
 
The following code can start IE Browser and one need not search for the location of the .exe file.

Code:
DEFINE VARIABLE chBrowserApplication AS COM-HANDLE.
Create "InternetExplorer.Application" chBrowserApplication.
chBrowserApplication:visible = True.

The HTML file can be loaded through a separate piece of code.
 
Back
Top