Why does Windows.System.Launcher.launchFileAsync fail with file from my local folder? RRS feed

  • Question

  • I am trying to launch an XML file from my app local folder and it fails with return value "false"

    The files path is C:\Users\myuser_000\AppData\Local\Packages\myapp_5f2frzpe4z2za\LocalState\conf\xxxx.conf.xml

    Any idea why this file is prohibited from being launched? The docs say only about executables. My app is in the foreground when I call launchAsync.

    Wednesday, December 3, 2014 10:57 PM

All replies

  • You need to provide more details. Launching an XML file from the LocalFolder works in general.

    What exactly are you doing?

    Please share a minimal repro sample demonstrating the problem on your OneDrive.

    Thursday, December 4, 2014 12:45 AM
  • Sure Rob. Easy to reproduce. http://1drv.ms/1AhCHCA
    • Edited by pkursawe Thursday, December 4, 2014 1:03 AM
    Thursday, December 4, 2014 1:03 AM
  • Hi Phil,

    Your test case didn't reproduce for me at first, but I was able to reproduce it by changing the default app for xml files. Basically, this is a safety check controlled by the current default file association.

    If you set the LauncherOptions.displayApplicationPicker = true then the file should launch successfully into the user's choice. You can call it without that first and then retry on a failure.


    Thursday, December 4, 2014 11:39 PM
  • Thanks Rob, I will try that. Can you elaborate about the safety checks? Who performs them? IE? Which is the default app for XML on my/customers system.
    Thursday, December 4, 2014 11:53 PM