By registering with us, you'll be able to discuss, share and exchange private messages with other members of our community.

SignUp Now!

Open UWP apps from the command line on Windows 10

I was looking for a way to open, from the command line, Windows 10 UWP apps.

I am referring to Windows 10 UWP apps that are downloaded from the store.

While the source code for most of the Microsoft Windows 10 UWP apps can be downloaded and compiled on my system, creating an .EXE to run the UWP apps, I want to run the app as installed from the Windows Store.

I've created a test .btm, which allows the selection of a few UWP apps, and then executes the UWP app from the command line.

Reference the Microsoft Document Launch an app with a URI for details.

@echo off
:: Open UWP apps from the command line on Windows 10
:: URI - Uniform Resource Identifier
:: UWP - Universal Windows Platform
text > clip:

set results=%@select[clip:,1,1,20,80,Select a file from the list]

switch %results
case Alarm_Clocks
  start ms-clock:
  ::explorer.exe shell:AppsFolder\Microsoft.WindowsAlarms_8wekyb3d8bbwe!App
case Calculator
  start ms-calculator:
  ::explorer.exe shell:AppsFolder\Microsoft.WindowsCalculator_8wekyb3d8bbwe!App
case Edge
  start microsoft-edge:
case Mail_To
  start mailto:
case Maps
  explorer.exe shell:AppsFolder\Microsoft.WindowsMaps_8wekyb3d8bbwe!App
case Store
  start ms-windows-store:
case Terminal
  explorer.exe shell:AppsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App
case To_Do's
  explorer.exe shell:AppsFolder\Microsoft.Todos_8wekyb3d8bbwe!App
case Twitter
  start twitter:
case Weather
  start bingweather:
case Get-AppxPackage
  :: Gets a list of the Microsoft app packages that are installed in a user profile.
  pshell /s "(Get-AppxPackage -Name Microsoft.*).PackageFamilyName" | *view
  :: Ref. https://docs.microsoft.com/en-us/powershell/module/appx/get-appxpackage?view=win10-ps
  echo No selection made.
Alternatively, you can create a shortcut and run the shortcut. I have a .LNK file to start MS Terminal for example. And I can start it by running the LNK file.
Indeed @samintz, that is an easier method.

I note that the shortcut does not provide alot of info;
c:\users\joe caverly\desktop>shortcut "Windows Terminal - Shortcut.lnk"
Link=Windows Terminal - Shortcut.lnk

...yet in the Shortcut Properties dialog, it shows the target, but it cannot be copied;


Non-UWP Apps provide more info;
c:\users\joe caverly\desktop>shortcut "TCC 25.lnk"
Command=C:\Program Files\JPSoft\TCMD25\tcc.exe
Directory=C:\Program Files\JPSoft\TCMD25
Link=TCC 25.lnk

Interesting! How did you make the shortcut. I have

v:\> which /a wt
wt is an external : C:\Users\vefatica\AppData\Local\Microsoft\WindowsApps\wt.EXE

I copied that file in explorer and pasted a shortcut ... giving


I can copy the target of the shortcut. When TCC executes C:\Users\vefatica\AppData\Local\Microsoft\WindowsApps\wt.EXE it waits (it shouldn't). When TCC executes the shortcut it doesn't wait. I have yet to see what C:\Users\vefatica\AppData\Local\Microsoft\WindowsApps\wt.EXE actually points to.
You can also

start shell:AppsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App

Joe, where/how did you get the string "AppsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App"?
Hey @vefatica ,
e:\utils>which /a wt
wt is an unknown command

Was your Windows Terminal installed from the Windows Store, or did you download the source code, and compile on your system to make WT.EXE?

Hey @vefatica ,
In the .BTM from Post #1, take a look at Get-AppxPackage.

Also refer to the link in Post #1, "Launch an app with a URI"

Hey @vefatica ,
e:\utils>which /a wt
wt is an unknown command

Was your Windows Terminal installed from the Windows Store, or did you download the source code, and compile on your system to make WT.EXE?

I installed "Microsoft.WindowsTerminal_1.0.1811.0_8wekyb3d8bbwe.msixbundle" which I think came from GitHub. I think that's equivalent to downloading it from the store. I don't have the source. C:\Users\vefatica\AppData\Local\Microsoft\WindowsApps\wt.EXE is not a real EXE. It's some kind of (undocumented?) reparse point which, I imagine, points to "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.0.1811.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe".

From the looks of Scott's shortcut, he has the same set-up. I'd still like to know how he made the shortcut.

I think I read that building your own will avoid all the store bull@#$%. Did you build it?
I installed Windows Terminal from the store.

I downloaded the source from GitHub, but never built it, as I wanted to use the Store release.

When you install a UWP app from the store, you cannot launch it via the .EXE from the command line.

When you download from GitHub, you can launch a UWP app via the .EXE

I don't know why this is, but that's what I discovered with another UWP app.

The Desktop Shortcut for Windows Terminal was created when I installed Windows Terminal from the Store.


I can launch WT.EXE but it's not a real app.

v:\> which /a windowsterminal
windowsterminal is an unknown command

v:\> which /a wt
wt is an external : C:\Users\vefatica\AppData\Local\Microsoft\WindowsApps\wt.EXE

c:\users\vefatica\appdata\local\microsoft\windowsapps> dir /k /m  wt*
2020-07-08  17:41               0  wt.exe

When I try to launch the real thing (even elevated) ...

v:\> "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.0.1811.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe"
TCC: (Sys) Access is denied.
 "C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.0.1811.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe"
You need to remove the _1.0.1811.0_x64_ from the filename, which leaves

Now, you can work that into;
explorer.exe shell:AppsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App
which can launch the app.

Remember, it's an APP, not an EXE

Note that entering

...will also work.

I've done some more work on my perl script to parse out the information from those UWP apps represented by zero length *.exe files in %localappdata%\microsoft\windowsapps. There are two separate entities there, the "Entry point" and the "Target". The target is the real executable, and can be run normally. The entry point would be what ends with "*!App" and can be used with the shell command.

Going back to the BTM script in the first post in this thread, that line:

pshell /s "(Get-AppxPackage -Name Microsoft.*).PackageFamilyName" | *view

does absolutely nothing on my computer.


  • reparse.zip
    979 bytes · Views: 174
pshell /s "(Get-AppxPackage -Name Microsoft.*).PackageFamilyName" | *view

does absolutely nothing on my computer.
Works here, but not the "view" part (I imagine because some PowerShell DLL is doing the output). Do you have PowerShell scripting enabled. A note in the help says

Note that you may need to enable PowerShell scripting on your system; on recent versions of Windows it is disabled by default (for security).
This gets it to go to VIEW.

pshell /s "(Get-AppxPackage -Name Microsoft.*).PackageFamilyName | d:\tc28\v"
Working for me now, thanks. I must have been doing something wrong yesterday, I couldn't get the basic powershell command to work, never mind the "view" or "v".
I found some interesting powershell code. The attached script can be run from tcc with the command:

pshell resolve2.ps1

It shows the target for every zero length *.exe file in %LOCALAPPDATA%\Microsoft\WindowsApps directory.


  • resolve.7z
    1.1 KB · Views: 161
UWP apps are very different from desktop apps in many ways. One significant difference between the two is that the UWP application does not have an EXE. If you want to open a UWP application, you can go through the Start menu, the list of applications in the Start menu, and create a shortcut for them on the desktop or add them to the startup folder. If you want to open UWP apps from the command line in Windows, you can. For example, it's much easier to open my games via UWP since I don't use shortcuts on the desktop. Lately, I've constantly been sitting in Minecraft on new servers Redirecting.
Last edited:
It isn’t quite that simple or straightforward. As best as I can determine, there is ALWAYS an executable file, somewhere, somehow. In some cases, the executable (.exe) is restricted so that you can’t run it directly. But… (you knew there was going to be a “but”, right?)

If you dig deep enough, if the real exe is restricted, then SOMEWHERE there will exist a zero length exe which is a super-special link pointing to the full size exe, and will bypass the access restriction.

For instance, Windows Terminal Preview (installed through the Store) exists here:

dir "%PROGRAMFILES%\WindowsApps\Microsoft.WindowsTerminalPreview_1.14.1452.0_x64__8wekyb3d8bbwe\wt.exe"

Volume in drive C is unlabeled Serial number is 8465:f9be
Directory of C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.14.1452.0_x64__8wekyb3d8bbwe\wt.exe

5/26/2022 18:02 96,256 wt.exe
96,256 bytes in 1 file and 0 dirs 98,304 bytes allocated
337,694,597,120 bytes free

But you cannot directly run that exe file. If you try, you will get access denied.

Howsomeever, there is a magic link located here:


That magic link (zero byte exe) points back to the full size exe file. You can check that with "fsutil reparsepoint query wt.exe". And when you use the magic link, you won't get an "access denied" message.

The one thing I haven't figured out (yet) is how to pass command line parameters using the magic link.