West Wind Internet and Client Tools
ShowHTML - IE11 not launching automatically
Gravatar is a globally recognized avatar based on your email address. ShowHTML - IE11 not launching automatically
  Aldrin
  All
  Jan 11, 2017 @ 01:34pm

I have a program is basicall using ShowHTML(m.thecontent, "C:\temp\tempfile.htm") to open up a the browser so the user can interact with it. It's working on my dev machine and another workstation with only IE11 as browser but for some reason it doesn't launch on other workstation with other browser installed. Any ideas? So far I have tried the following:

  • Default *.htm ( the file that I'm creating ) to IE11
  • Default IE11 as default browser on every workstations

Another note, if I open up task manager I can actually see that iexplore.exe is running on the Process tab meaning the program was instantiated but for some reason it's not showing up.

Ideas?

Gravatar is a globally recognized avatar based on your email address. re: ShowHTML - IE11 not launching automatically
  Harvey Mushman
  Aldrin
  Jan 11, 2017 @ 01:40pm

You wrote "it doesn't launch on other workstation with other browser installed"... what other browser does it not work with? ANd what is in the content of the HTML file? Maybe there is script code that needs to load and in other browsers it is considered unsafe. Only guessing based on the information provided.

I have found both Firefox and Chorme to be very stable. IE11 not as much.

Gravatar is a globally recognized avatar based on your email address. re: ShowHTML - IE11 not launching automatically
  Rick Strahl
  Aldrin
  Jan 11, 2017 @ 01:41pm

ShowHtml() uses the Windows Shell API which uses Monikers to determine what application gets launched. When you do ShowHtml() or GoUrl() it'll use whatever the default browser of the system is. For example, for me Chrome opens for URLs.

If that doesn't work the machine may have a configuration problem with the default browser association. Never really seen that though - usually if something is wrong with the configuration it just defaults back to IE.

I would double check on the users machine to see what the Default Programs and Default Browser setting is set to.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: ShowHTML - IE11 not launching automatically
  Aldrin
  Rick Strahl
  Jan 11, 2017 @ 01:45pm

Hi Rick,

That's basically I thought (Default program/browser setting). Is there a way to force it to use IE11 though? I know that there is a 3rd parameter on ShowHTML() but not sure how to use or if that would help though.

Aldrin

Gravatar is a globally recognized avatar based on your email address. re: ShowHTML - IE11 not launching automatically
  Rick Strahl
  Aldrin
  Jan 11, 2017 @ 05:01pm

No. You have no control what's used for shell ui. That's an OS thing.

But if you want to force using IE you can use InternetExplorer.Application as a COM object explicitly.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: ShowHTML - IE11 not launching automatically
  Aldrin
  Rick Strahl
  Jan 16, 2017 @ 10:13am

FYI, the issue has been resolved. I'm passing a 3rd parameter on the ShowHTML(m.thecontent, "C:\temp\tempfile.htm", oIEBrow), my OP was incomplete. I just need to make it visible:

oIeBrow=CreateObject("InternetExplorer.Application")

ShowHTML(m.thecontent, "C:\temp\tempfile.htm", oIEBrow)

oIeBrow.visible = .T.

© 1996-2024