Open DHowett-MSFT opened 4 years ago
Adding information from duplicate of linked PowerToys issue: https://github.com/microsoft/PowerToys/issues/7819
Is this one related to running under admin?
No.
I suspect this is because LaunchUriAsync and ShellExecute are not the same. I don't see "file:" as one of the schemes in https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-default-app (though "file" is in the list of reserved schemes). I also see that there's "LaunchFileAsync" that got added so presumably we are supposed to call that for file paths ... though it's weird that file scheme isn't invoking that same LaunchFileAsync path.
@jonwis @drustheaxe do you know what's up here?
@crutkas @DHowett-MSFT I'm no expert, but I'm thinking the NavigateURI
is NOT intented to be used with files in the first place. I mean, the word "navigate" sounds like the key word here. Opening a file is something totally different then navigating to a (web or settings) page. Check out https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-the-default-app-for-a-file. You should use the Click=""
function.
Besides that, does the app have access to the file or location? Just came across this: https://docs.microsoft.com/en-us/windows/uwp/files/file-access-permissions#accessing-additional-locations amd https://docs.microsoft.com/en-us/windows/uwp/files/file-access-permissions#locations-that-uwp-apps-can-access.
I suspect this is because LaunchUriAsync and ShellExecute are not the same. I don't see "file:" as one of the schemes in https://docs.microsoft.com/en-us/windows/uwp/launch-resume/launch-default-app (though "file" is in the list of reserved schemes). I also see that there's "LaunchFileAsync" that got added so presumably we are supposed to call that for file paths ... though it's weird that file scheme isn't invoking that same LaunchFileAsync path.
@jevansaks The title says enough: "Launch the default APP for a URI"
Describe the bug
Clicking this button results in nothing happening (not even an exception).
Steps to reproduce the bug
As above. Have a file called
sad.html
in C:.Terminal's use case was embedding third-party notices as an HTML file in our package and then launching the browser to that file.
Expected behavior It works.
Version Info Windows 10.0.19041.0 This is a platform HyperlinkButton, so I presume it doesn't matter which version of MUX is in use.