In PowerShell, if I run Get-AppxPackage, I get a list of UWP apps installed, including mine. For example:
Name : TonyHenrique.tonyuwpteste
Publisher : CN=tTony
Architecture : X64
ResourceId :
Version : 1.1.12.0
PackageFullName : TonyHenrique.tonyuwpteste_1.1.12.0_x64__h3h3tmhvy8gfc
InstallLocation : C:\Program Files\WindowsApps\TonyHenrique.tonyuwpteste_1.1.12.0_x64__h3h3tmhvy8gfc
IsFramework : False
PackageFamilyName : TonyHenrique.tonyuwpteste_h3h3tmhvy8gfc
PublisherId : h3h3tmhvy8gfc
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
Dependencies : {Microsoft.NET.CoreRuntime.2.1_2.1.25801.2_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00.Debug_14.0.25805.1_x64__8wekyb3d8bbwe,
TonyHenrique.tonyuwpteste_1.1.12.0_neutral_split.scale-100_h3h3tmhvy8gfc}
IsPartiallyStaged : False
SignatureKind : Developer
Status : Ok
Now I want to start this app.
How to do this in PowerShell, or in cmd?
If you want to open a UWP app, you can go through the Start Menu, the apps list in the Start menu, you can create a desktop shortcut for them, or add them to the start up folder. If you want to open UWP apps from the command line on Windows, you can.
UWP is one choice for creating apps that run on Windows 10 and Windows 11 devices, and can be combined with other platforms. UWP apps can make use of Win32 APIs and .
Please run Windows Store Apps troubleshooter from Settings app > Update & security > Troubleshoot. See if it helps you. Hope this helps!
During development, I've encountered a situation where the app family name occasionally changed. You can reliably launch an app by name with a simple lookup:
Cmd
powershell.exe explorer.exe shell:AppsFolder\$(get-appxpackage -name YourAppName ^| select -expandproperty PackageFamilyName)!App
Powershell
explorer.exe shell:AppsFolder\$(get-appxpackage -name YourAppName | select -expandproperty PackageFamilyName)!App
With the Windows 10 Fall Creators Update 1709 (build 16299) you now have the ability to define an app execution alias for your UWP app, so you can launch it easily from cmd or powershell:
<Extensions>
<uap5:Extension
Category="windows.appExecutionAlias"
StartPage="index.html">
<uap5:AppExecutionAlias>
<uap5:ExecutionAlias Alias="MyApp.exe" />
</uap5:AppExecutionAlias>
</uap5:Extension>
</Extensions>
Furthermore, we now support commandline arguments for UWP apps. You can read them from the OnActivated event:
async protected override void OnActivated(IActivatedEventArgs args)
{
switch (args.Kind)
{
case ActivationKind.CommandLineLaunch:
CommandLineActivatedEventArgs cmdLineArgs =
args as CommandLineActivatedEventArgs;
CommandLineActivationOperation operation = cmdLineArgs.Operation;
string cmdLineString = operation.Arguments;
string activationPath = operation.CurrentDirectoryPath;
See blog post: https://blogs.windows.com/buildingapps/2017/07/05/command-line-activation-universal-windows-apps/
Try this in PowerShell:
start shell:AppsFolder\TonyHenrique.tonyuwpteste_h3h3tmhvy8gfc!App
If you know the display name, you can use Get-StartApps
, which includes the correct suffix:
start "shell:AppsFolder\$(Get-StartApps "Groove Music" | select -ExpandProperty AppId)"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With