Reputation: 21
I have local html files that my program produce. How can i open these local html files from command line with MS Edge?
For MS InterbetExplorer I have (working) command like (%f
is path to html):
{pathToExplorerExecutable}"file:///%f"
For MS Edge I found executable in C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe
, but when I try same command, that I use for IE, nothing happens.
I also tried command: start microsoft-edge:file///%f
still did not work.
Is there any way to open local file in MS Edge from command line?
Upvotes: 2
Views: 4667
Reputation: 15388
In case of Edge Browser it is:
start shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge file:///C:/test.html
Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge
value from?That value is in format [PackageFamilyName]![ApplicationID]
.
It can be found in the AppManifest.xml of Edge browser or via regitry (if Edge is set as the default webbrowser):
Get default webbrowser from the ProgId
value of registry key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\UserChoice
The value will be AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9
in case of Edge.
Take that ProgId
value to open the following key:
HKEY_CLASSES_ROOT\[ProgId]\Application
or
HKEY_USERS\[CurrentUserID]_Classes\[ProgId]\Application
So in case of Edge, open HKEY_CLASSES_ROOT\AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9\Application
.
Read the value of AppUserModelID
.
Upvotes: 2