none
Launching Windows Store (Metro) apps from desktop command line? RRS feed

  • Question

  • Using the PowerShell command "

    Get-AppxPackage -AllUsers

    " I can see all the Windows Store apps installed on the system. I can launch Windows Store apps using the following command in a desktop command line (which would launch "Maps"

    C:\Windows\System32\cmd.exe /c start "" "bingmaps:"

    However, I cannot seem to find how to launch apps by their name, or any key I can see in the PowerShell output. I can launch Netflix by using it's name, but that was simply a guess. I have even browsed to the InstallLocation listed in the PowerShell output and looked at "AppxManifest.xml" for a key that exists across all apps, but haven't had any luck with that either. I'd like to programmatically create a small launcher that would parse the output of the PowerShell and be able to launch Store apps from the desktop. I have this working for "known" apps, but not for those that I can't find that proper "Name" to launch by.

    Can anyone point me in the direction of finding the proper "name" by which to launch a Windows Store app like the above?

    Thanks in advance.

    • Moved by Rob Caplan [MSFT]Microsoft employee Wednesday, October 17, 2012 2:50 AM Desktop app question, not a Windows Store app development (From:Tools for Windows Store apps )
    Tuesday, October 16, 2012 6:54 PM

Answers

  • There is no in-box way to launch Windows Store apps from a command line, only from the start menu. In your example you aren't directly launching the app, but are launching the default handler for the bingmaps: protocol. This is similar to starting Notepad by launching a .txt file or your default browser by launching a http: URL.

    You could programmatically create your own launcher with IApplicationActivationManager . There is a discussion of how to do this and sample code in Automating the testing of Windows 8 apps .

    --Rob

    Wednesday, October 17, 2012 2:50 AM

All replies

  • There is no in-box way to launch Windows Store apps from a command line, only from the start menu. In your example you aren't directly launching the app, but are launching the default handler for the bingmaps: protocol. This is similar to starting Notepad by launching a .txt file or your default browser by launching a http: URL.

    You could programmatically create your own launcher with IApplicationActivationManager . There is a discussion of how to do this and sample code in Automating the testing of Windows 8 apps .

    --Rob

    Wednesday, October 17, 2012 2:50 AM
  • You can use this open source module to launch apps: https://win8powershell.codeplex.com/

    Monday, July 15, 2013 5:43 PM
  • Go to Control Panel\All Control Panel Items\Default Programs and select Associate a file type or protocol with a specific program. Scroll to the Protocols section to see if the protocol is listed

    Then you can see apps name like bingmaps or other name of the specific app that you want

    Sunday, December 31, 2017 4:50 PM