title: How can I open a local HTML file in Microsoft Edge browser?
body: <p>Since time immemorial, most web browsers have been able to open a local file if you ran the web-browser executable, for example just execute <code>iexplore.exe file:/c:/temp/file</code> or via the <code>IShellDocView</code> interfaces.  I am trying to do this from within my own program, in Windows 10, with Microsoft Edge, and am unaware of how to do it.</p>
  
  <p>The executable appears to be completely undocumented, does not respond to /? or /help, and simply crashes no matter what I pass to it, and given that the path appears to be likely to change, is probably not the correct approach to invoke this executable directly:</p>
  
  <pre><code>  C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe  &lt;whatever&gt;
  </code></pre>
  
  <p>Is there an API in Windows that can be invoked instead, that will open Edge, perhaps even if it is not the current default browser?</p>
  
  <p>If it was the default browser, I believe I could just do what I want via Win32 shell-API <code>ShellExecute</code>. I would like to be able to launch something in Edge even if I have set another browser as my default though, for the purpose of automating certain web-testing tasks.</p>
  
  <p>Are there programmatic interfaces or APIs for Edge? For purposes of this question, let's say I want to write this in C, but this should be the same API no matter what language I'm using so I didn't tag this question C.</p>
  
  <p>If there is no way to do it programmatically, is there a command line argument I could use and pass to a MicrosoftEdge or MicrosoftEdgeCP executable?</p>