While none of that matters when you're using the Windows GUI to launch apps, CMC's External Links feature requires a command line to launch programs, including Windows 10 Apps.
Below is a process I've gleaned from the web, and distilled down to what is needed for CMC.
Install the Windows 10 App
If you haven't already, the first step is to install the app from the Windows 10 store. All of the steps below will fail if you have not already installed the app you want CMC to launch.
Check for a Shortcut
The next step is to see if there is a shortcut. For example, the Netflix app has a shortcut. To access that shortcut, you go to a command prompt (run CMD.exe, an easy way to do this is with the Windows hotkey WIN+R then enter cmd.exe), then run:
Code: Select all
start Netflix:
And Netflix starts right up (well, assuming you actually had the Netflix app installed). Some apps have a non-working shortcut, like Pandora, as doing a "start pandora:" starts the app, which then immediately crashes. So obviously you'll want to make sure that the shortcut actually works.
Not all apps have a shortcut, and even for the ones that do, I'm not sure how you determine what the shortcut value is that you need to use. All I can recommend is a guessing game. For example, if you are trying to discover the shortcut for the Pandora Music app, you might try various values like this:
Code: Select all
start pandora:
start pandoramusic:
start pandora-music:
start pandora_music:
start pandoraapp:
start pandora-app:
start pandora_app:
You might also get an error message like this, which also indicates the shortcut you tested doesn't work:
If you don't get lucky, you may want to do a quick google search, i.e. "start Win10 app pandora command line", as someone else may have discovered the shortcut and posted it for you. But don't get your hopes up, as in my experience only about 1 in 5 apps seem to have a working shortcut.
If you do get lucky with a working shortcut, the app will open up. In that case you're done, and you can use that shortcut directly in CMC. To use a Win10 App shortcut in CMC, you would need to set:
Code: Select all
Exe = %windir%\system32\cmd.exe
Exe Params = /c start netflix:
If you didn't get lucky and find a shortcut, then you'll need to follow the longer process below.
Finding the Shell Launch Parameters
While the shortcut method described above may only work for 1 in 5 apps, the Shell launch method works for all Windows 10 apps. It takes quite a few steps to find the launch parameters, but the steps aren't too hard so just take them one-by-one and you'll be fine.
1) Open a command prompt (run CMD.exe). An easy way to do this is with the Windows hotkey WIN+R then enter cmd.exe.
2) Enter the following command:
Code: Select all
powershell get-appxpackage >123.txt
Also note that the 123.txt file will only contain currently installed apps. If in the future you install a new app and want to launch it with CMC, you'll need to redo this step to recreate the 123.txt file with new data.
3) In Windows, browse to your user directory, i.e. C:\Users\<YourUserName>, replacing <YourUserName> with the Windows user with which you are currently logged in. For example I go to C:\Users\Paul, since Paul is my Windows username.
4) In your user directory, find the 123.txt text file you just created in step 2. Open that file, then find the app you're working on in the list of installed apps. In most text programs, you can do a CTRL+F to open a search window, then put the name of the app you're searching for. Once you find it, you will need to get 2 values: InstallLocation and PackageFamilyName. For example, here are those 2 values for Pandora:
InstallLocation : C:\Program Files\WindowsApps\PandoraMediaInc.29680B314EFC2_13.0.39.0_x64__n619g4d5j0fnw
PackageFamilyName : PandoraMediaInc.29680B314EFC2_n619g4d5j0fnw
5) Take note of the PackageFamilyName, you will need to use it later to launch the app from the command line (Step 8b below).
6) Copy the InstallLocation path (starting at C:\Program Files\…, highlight the path and do a CTRL+C to copy), then press WIN+R to open a run prompt, then CTRL+V to paste the filepath you just copied, then press OK:
This will open up the hidden folder. *NOTE: do NOT try to browse to that folder using Windows File Explorer starting from C:\Program Files\ as the WindowsApps folder is completely blocked from being browsable. The ONLY way to get to the hidden app folder is to use the steps above to open the target folder directly.
7) In this folder, open the file named AppxManifest.xml (you can typically double-click it and Windows will open it with Internet Explorer):
When you open the file you will see the manifest XML data. It may look overwhelming, but don't worry, you only need one piece of info from it, and it's easy to find. Following along in the screenshot below, first look for a tag named <Applications>, then right below it you will find another tag named <Application with a bunch of values inside of it. It may look different than the screenshot below, but regardless it should have a property named Id in it. Usually this Id value will be "App", but it can be anything. Take note of this value:
8) Finally you have everything you need to launch the Windows 10 app from the command line. To test it, follow these steps:
a) Open a command line (WIN+R, cmd.exe)
b) The command to launch a Win10 app has the following structure:
explorer shell:appsFolder\<PackageFamilyName>!<Id>
You will need to replace PackageFamilyName with the value you found in the 123.txt file, and Id with the value you found in the AppxManifest.xml file, like this:
explorer shell:appsFolder\PandoraMediaInc.29680B314EFC2_n619g4d5j0fnw!App
Enter that command at the command prompt and press ENTER, and the Windows 10 App should launch.
9) Now that you've validated the command works to launch the app, here's what you need to use in the custom CMC External Link definition:
Code: Select all
Exe = %windir%\system32\explorer.exe
Exe Params = shell:appsFolder\PandoraMediaInc.29680B314EFC2_n619g4d5j0fnw!App