Monday, January 16, 2017

Launch a store installed app from the command line

Starting a normal app from the command line (or a script, or a scheduled task) is easy. Just start the executable.
But 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

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.


Wednesday, January 04, 2017

Tuesday, January 03, 2017

Thursday, November 17, 2016

Did Microsoft just make Tizen more important than Windows Mobile?

Well, probably not.

Let me back up for a minute.
This week, at their Connect event, Microsoft announced the Visual Studio Tools for Tizen.
If you're not familiar with Tizen that might not mean anything to you. I know there are a lot of Windows fan[boy]s who read my blog and so for you: Tizen is an operating system created by Samsung. It's had a varied history being used on some phones as well as in watches, TVs, and more. It's generally assumed to have been created as a response to Android with a view to allowing Samsung to control the whole experience on their phones but has had limited success on phones. (Launching an entire mobile ecosystem--apps, services, etc.--is hard.)
I seem to recall claims of it having been killed off at least a couple of times but it's still going strong. It's going so strong it claims to be installed on 50 million devices!

Microsoft providing tools to develop apps for this OS makes sense given Satya's (and Microsoft's) aim to provide tooling for:
any app, any OS, any dev
At the event where this was launched, there was no talk of Windows 10 Mobile. Can we read anything into this? Of course, people will read all sorts of things into this but there's no real news about this.

Just because Windows 10 Mobile wasn't mentioned doesn't mean it's gone/going away. It means there's nothing to announce right now.

This announcement enables those already building with C# to more easily create apps for Tizen devices. Or anyone already with a separate codebase for Tizen apps to combine/aggregate their code.

Think of the mobile version of Windows 10 being in a holding pattern right now.
It's just waiting for great things in the future. I suspect that the speed of hardware development is a big (but not the only) issue holding things back in terms of being able to differentiate mobile devices. I saw some early research about the aims of continuum and what it will enable but current hardware costs and capabilities still don't make this possible.
Let's see what (else?) the future brings...

Thursday, November 10, 2016

Using a Surface Dial to scroll through a playing track

So, I'm very impressed with the new Surface Dial. It's smaller than I was expecting but feels really nice to use. Plus it's easy to program!

Official links are here. Or see the sample I put together below.
Instructions on pairing:
Coding instructions:
Official sample:

Yes, it's an ugly app but I wanted to see how easy it would be to use it to skip back and forwards through a playing track. I'll often be listening to podcasts and skip back a little bit to have something repeated. I thought this would be a suitable tool for such a task.

It's a simple app.

  • Pick a track and it starts playing.
  • Tap the dial to toggle pause and playback.
  • Scroll the dial to move forwards and backward through the track.
  • There's also a button to toggle playback and a visualization of how far through the track it is.
Point of note:

  • It's possible to automatically select the (radial) menu item but I couldn't get it to set in the page constructor, OnNavigatedTo event, or the Loaded event. Because it's tied to the window (so different apps can have different menu items selected) I can understand why it needs a window available but I would have thought this possible in the Loaded event. Instead, I set this when a track is picked in my code.

There's lots more that can be done with the dial. Including:

  • Handling velocity of scrolling
  • Haptic feedback
  • Placement on screen (but I'll need a Surface Studio for that)

Code embedded below and at

Other SurfaceDial projects to check out: