how to use file protocol to open my documents RRS feed

  • Question

  •             // Pop notifications

                popToastControl.Payload =
                    <toast activationType='protocol' launch='file:///%USERPROFILE%\My Documents'>
                            <binding template='ToastGeneric'>
                                <text>Click to launch Bing Maps</text>
                                <text>Searches for ""1 Microsoft Way, 98052""</text>

    I‘ve tried this, but not work, it only worked as this way:file:///C:\Users\Michael-DEV\Documents

    I learned from this sample.
      [1]: https://github.com/Microsoft/Windows-universal-samples

    Friday, December 8, 2017 8:00 AM

All replies

  • file:///%USERPROFILE%\Documents

    works  for me on Windows 10

    (I have no "My Documents" forder)

    Friday, December 8, 2017 8:49 AM
  • Hi Castorix

    thanks for sharing your answer, and I know this way, I mean surely it could run when you type Win+R and copy this as command, but when you try to inject this command to toast message xml grammer, to skip to my documents by click your toast message, it didnot work anymore. It seems that in UWP toast message xml schema, launch property just cannot support wildcard, I even tried to open %appdata% by click a toast message, fails all the way...

    Friday, December 8, 2017 9:08 AM
  • Hi JerusalemSky,

    For the questions about the samples in GitHub, you could ask in Issues of GitHub.

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework, including Managed Extensibility Framework (MEF), Charting Controls, CardSpace, Windows Identity Foundation (WIF), Point of Sale (POS), Transactions. 

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, December 12, 2017 6:35 AM