I know you can use the Get-AppxPackage and Get-AppxPackageManifest cmdlets in Powershell to get the package family and it's specific application entry point.
In this example with Windows Media Player (which is internally called Zunemusic, a relic from back when Microsoft competed with the iPod), the following gives us the package family name.
(Get-AppxPackage Microsoft.ZuneMusic).PackageFamilyName
Microsoft.ZuneMusic_8wekyb3d8bbwe
And it has one application called Microsoft.ZuneMusic
(Get-AppxPackage Microsoft.ZuneMusic | Get-AppxPackageManifest).Package.Applications.Application
Id : Microsoft.ZuneMusic
Executable : Microsoft.Media.Player.exe
EntryPoint : Microsoft.Entertainment.Music.App
VisualElements : VisualElements
Extensions : Extensions
A similar example with the Clipchamp application
(Get-AppxPackage Clipchamp.ClipChamp).PackageFamilyName
Clipchamp.Clipchamp_yxz26nhyzhsrt
(Get-AppxPackage Clipchamp.Clipchamp | Get-AppxPackageManifest).Package.Applications.Application
Id : App
Executable : Clipchamp\Clipchamp.exe
EntryPoint : Windows.FullTrustApplication
VisualElements : VisualElements
Extensions : Extensions
And I can start those applications easily using explorer.exe shell:appsFolder\<package family name>!<app>, but I can't seem to pass arguments to either application. Using the following:
explorer.exe shell:appsFolder\Clipchamp.Clipchamp_yxz26nhyzhsrt!App "C:\tmp\test.mp4"
start shell:appsFolder\Microsoft.ZuneMusic_8wekyb3d8bbwe!Microsoft.ZuneMusic C:\tmp\test.mp4
I've tried variations of using start vs explorer.exe as well as quoting and not quoting the argument. Surely these applications do take in file arguments somehow? I can right click in Explorer and use Open With to launch the application with a specific file, but I need to do this programmatically in one of my applications. How to I launch one of these applications from the command line and provide it a file argument?
C:\Program Files\WindowsApps\Microsoft.ZuneMusic_11.2509.7.0_x64__8wekyb3d8bbwe\AppxManifest.xmlin general they don't take arguments, they can be activated by various ways (or not), protocol for examplemswindowmusic:(reddit.com/r/windowsphone/comments/6kixvo/…) in media player case.(Get-AppxPackage Microsoft.ZuneMusic | Get-AppxPackageManifest).Package.Applications.Application.Extensions.Extension.Protocolcan get a list of protocols. But I can't find much other documentation on this. I can runstart mswindowsmusic://, but I can't find information on how to pass a file to open. TheAppManifest.xmljust describes it as awindows.protocol. How does Explorer pass the file viaOpen With. Surely there's got to be a standard and programmatic way to open FileA.mp4 with ApplicationX?Start-Process 'microsoft-edge:https://en.wikipedia.org?search=wikipedia'. So it's worth trying ifStart-Process mswindowsmusic:<file-url>works.desktop4:FileExplorerContextMenus) tells you it's Clipchamp.ShellExtension.dll that will start clipchamp when using it on supported file extension. This shell extension is passed the shell items by the Shell (explorer, dialog boxes, etc.) and starts Clipchamp, using a custom undocumented command line. Note you can programmatically run this shell extension (so you can programmaticall start ClipChamp on a given file) but the story is different for every app.