Closed Bug 772711 Opened 12 years ago Closed 12 years ago

Invoking default application does not work if default application is a metro app


(Core Graveyard :: File Handling, defect)

Windows 8.1
Not set


(Not tracked)



(Reporter: bbondy, Assigned: bbondy)


(Blocks 1 open bug)


(Whiteboard: completed-elm)


(1 file)

When trying to obtain the command to execute for a default application we simply check:
HKEY_CLASSES_ROOT\[appid]\Shell\Open\command's default value.

If that value is not filled out then mDefaultAppDescription will be empty and this call will return no default handler.

> nsMIMEInfoWin::GetHasDefaultHandler(bool * _retval)

But sometimes this 'command' key can be left blank and instead a DelegateExecute can be used.  This is the case for all (or most?) metro apps.

To fix this we should lookup the path from the class ID instead.
You can test this right now since pdfjs isn't working in metro by clicking on a pdf file.  Before this patch it would give an error.  After this patch it will succeed and invoke the default pdf viewer in metro.
Attached patch Patch v1.Splinter Review
This is a review request for m-c.
Attachment #640883 - Flags: review?(jmathies)
Blocks: 772815
Component: Widget: Win32 → File Handling
Comment on attachment 640883 [details] [diff] [review]
Patch v1.

Review of attachment 640883 [details] [diff] [review]:

::: uriloader/exthandler/win/nsOSHelperAppService.cpp
@@ +431,5 @@
> +    if (NS_FAILED(rv)) {
> +
> +      // Check if there is a DelegateExecute string
> +      nsAutoString delegateExecute;
> +      rv = regKey->ReadStringValue(NS_LITERAL_STRING("DelegateExecute"), delegateExecute);

nit - missing rv check - you use this string below in querying the path.
Comment on attachment 640883 [details] [diff] [review]
Patch v1.

tested on win8, works with pdfs. Although the default app name is 'TWINUI', is that expected?
Attachment #640883 - Flags: review?(jmathies) → review+
I noticed that too, I'm not sure if it's right or not but we can file a follow up if it has problems.
Blocks: elm-merge
Pushed to try, if that passes I'll push to m-i.
Whiteboard: completed-elm
> Although the default app name is 'TWINUI', is that expected?

I'll file a new bug to investigate this. I seen now that you can see this name inside the options of application / mime type association.
Depends on: 772863
Closed: 12 years ago
Resolution: --- → FIXED
OS: Windows 8 Metro → Windows 8.1
Depends on: 1260483
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.