Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Launching a Store-Installed App From the Command Line

DZone's Guide to

Launching a Store-Installed App From the Command Line

Starting a normal app from the command line is usually easy, but how are you supposed to start apps installed from the Windows Store when they don't have executables?

· Mobile Zone
Free Resource

Launching an app doesn’t need to be daunting. Whether you’re just getting started or need a refresher on mobile app testing best practices, this guide is your resource! Brought to you in partnership with Perfecto

Starting a normal app from the command line (or a script or a scheduled task) is easy. Just start the executable.

However, apps that are installed from the Windows Store don't have executables. So, how do you start them?

The simplest way is if the app has a custom protocol. If it does, then it's just a case of calling start and then the protocol. So, you could do something like this:

start microsoftvideo:

If you want to add a custom protocol to your app, see this link

If the app doesn't have its own custom protocol, then you'll have to launch it via the shell. Actually, the shell has its own protocol, so you call something like this:

start shell:AppsFolder\Microsoft.WindowsStore_8wekyb3d8bbwe!App

Here,  Microsoft.WindowsStore_8wekyb3d8bbwe is the PFN (Product Family Name) of the app to launch. Fortunately, these names are easy to find as there are folders with these names for each of the installed apps at  C:\Users\[username]\AppData\Local\Packages.

That folder also includes some things you can't call directly plus some folders that are actually part of other experiences (try start shell:AppsFolder\Microsoft.Windows.SecondaryTileExperience_cw5n1h2txyewy!App) so you can't use everything there.

Keep up with the latest DevTest Jargon with the latest Mobile DevTest Dictionary. Brought to you in partnership with Perfecto.

Topics:
mobile ,tutorial ,command line ,mobile apps ,windows store

Published at DZone with permission of Matt Lacey, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}