Monday, June 7, 2021

Find the command line for an Appx (UWP) app

 Well this doesn't feel like a great solution but it works for now.  If I find a better way I'll come back and update this.

Scan your AppX package details and pull out ones that have a key word.  In this case we'll use Camera as an example

get-appxpackage | ?{$_.PackageFullName -like "*camera*"}

which returns

Name              : Microsoft.WindowsCameraPublisher         : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US

Architecture      : X64
ResourceId        :
Version           : 2021.105.10.0
PackageFullName   : Microsoft.WindowsCamera_2021.105.10.0_x64__8wekyb3d8bbwe
InstallLocation   : C:\Program Files\WindowsApps\Microsoft.WindowsCamera_2021.105.10.0_x64__8wekyb3d8bbwe

IsFramework       : False

PackageFamilyName : Microsoft.WindowsCamera_8wekyb3d8bbwe
PublisherId       : 8wekyb3d8bbwe

IsResourcePackage : False
IsBundle          : False
IsDevelopmentMode : False
NonRemovable      : False

Dependencies      : {Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe, 

                    Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe, 

                    Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe}

IsPartiallyStaged : False
SignatureKind     : Store
Status            : Ok

Go to the InstallLocation and open the AppxManifest.xml and locate the Application ID.  In this case the line appears:

<Application Id="App" Executable="WindowsCamera.exe" EntryPoint="Microsoft.CameraApp.Windows.App">

Now we have the items to create the command line

explorer.exe shell:appsfolder\<PackageFamilyName>!<Application ID>

e.g.

explorer shell:appsfolder\Microsoft.WindowsCamera_8wekyb3d8bbwe!App