How to Launch UWP app from Task Scheduler

Viewed 127

I have an app that converts UWP InkCanvas drawings into SVG from UWP native ISF. I need to run it daily, and the conversion logic does not work in either Console apps, WPF apps or Windows Forms apps with Ink Canvas - as there appear to be differences between as to how InkCanvas data is serialized on these other platforms.

I'm looking for a way to launch the UWP app on a schedule - so any pointers in that direction are greatly appreciated.

I do understand that using the UWP apps in this way is probably not a recommended scenario - unfortunately I do not have control over the app that produces these drawings initially - but I do need to convert them to SVG.

1 Answers

If your UWP application is registered to a URI schema it's relatively straightforward to do.

For the scheduled task set explorer.exe as the app, and your-app-schema:// as the parameter.

scheduled task settings

You can check the schemas and registered apps under Settings -> Apps -> Default Apps -> Choose default apps by protocol. For example the Windows Calculator is registered as calculator://.

You can register a protocol for your application (if you develop it) with the instructions here: https://docs.microsoft.com/en-us/windows/uwp/xbox-apps/automate-launching-uwp-apps#protocol-activation

Related