'Programatically launch Windows Photos App in Edit mode

How can I programmatically launch Windows built-in photos app with a specific file loaded and in edit mode?

(It should be possible since there's an "Edit with Photos" command in the right click context menu in Windows Explorer).

If it helps, I found this registry script that adds the command:

Windows Registry Editor Version 5.00

; Created by: Shawn Brink
; Created on: July 3rd 2017
; Tutorial: https://www.tenforums.com/tutorials/88126-edit-photos-context-menu-add-remove-windows-10-a.html


[HKEY_CLASSES_ROOT\AppX43hnxtbyyps62jhe9sqpdzxn1790zetc\Shell\ShellEdit]
"ActivatableClassId"="App.AppX65n3t4j73ch7cremsjxn7q8bph1ma8jw.mca"
"Extended"=-
"ProgrammaticAccessOnly"=-
"PackageId"="Microsoft.Windows.Photos_2017.39091.15730.0_x64__8wekyb3d8bbwe"
"ContractId"="Windows.File"
"DesiredInitialViewState"=dword:00000000
@="@{Microsoft.Windows.Photos_2017.39091.15730.0_x64__8wekyb3d8bbwe?ms-resource://Microsoft.Windows.Photos/Resources/EditWithPhotos}"

[HKEY_CLASSES_ROOT\AppX43hnxtbyyps62jhe9sqpdzxn1790zetc\Shell\ShellEdit\command]
"DelegateExecute"="{4ED3A719-CEA8-4BD9-910D-E252F997AFC2}"



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source