Windows 8 is losing options in the "Open with" menu after changing file associations

18

2

When I set a program to open a specific file type by default, it works (like Word 2013 for PDF files). However, when I change the default back to reader, I lose Word as an option that I can pick in the open with sub-menu.

How can I get it to stick?

It seems that there is something special about Word. Adding Notepad++ as the default and then changing it back seems to keep Notepad++ on the sub-menu.

Word version is 2013.

In case it was not clear, I am using the RTM version (not the preview).

soandos

Posted 2012-10-21T00:08:38.783

Reputation: 22 744

Did you try the "Associate a file type or protocol with a program" from control panel through "Default programs"? – avirk – 2012-10-24T01:44:13.890

@avirk Assuming that you mean just set it as the default, that works (but is not what is going wrong). Changing the default back removes Word as an option – soandos – 2012-10-24T01:47:30.047

I think it would be worth to give it a shot. – avirk – 2012-10-24T02:09:07.747

did you checked that the value is inserting in the registry at the path HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.docx\OpenWithList. There should be a list of program that have you associate for the .docx or whatever extension you want to check. – avirk – 2012-10-24T03:02:54.917

@avirk Very strange. It is there (as is chrome, which also does not show up on the list) but the default program to open it (reader) is not listed – soandos – 2012-10-24T03:30:34.150

Then I think its a bug on your RTM, as I can set the default associations and they are appearing in open with list of registry as well. – avirk – 2012-10-24T03:32:50.137

@avirk the bug is not with the default, its that the programs that are not listed as the default don't all show up on the submenu – soandos – 2012-10-24T03:34:47.000

let us continue this discussion in chat

– avirk – 2012-10-24T03:36:30.117

@soandos: Have you installed the latest massive Windows Update for Windows 8? – harrymc – 2012-10-24T12:37:31.110

@harrymc, Just checked for updates, and I have everything – soandos – 2012-10-24T17:47:42.933

You could maybe try to repair Office 2013. – harrymc – 2012-10-24T19:01:09.920

@harrymc a quick repair did not do anything. – soandos – 2012-10-24T19:25:35.753

Maybe you could reestablish Word in the Open with menu by browsing for winword.exe using this menu. – harrymc – 2012-10-25T07:10:16.433

@harrymc I think you are on to something. What is the exe? It seems to be showing this when it is running http://snag.gy/t2xKA.jpg

– soandos – 2012-10-25T07:13:25.750

I think it's probably in C:\Program Files\Microsoft Office\Office15. – harrymc – 2012-10-25T07:30:56.487

let us continue this discussion in chat

– soandos – 2012-10-25T07:39:16.573

Just installed the RTM yesterday and I don't have this issue so I guess it was related to it being a preview :). – cmplieger – 2012-10-25T13:01:18.463

Answers

4

What's is the Up!?!

Hello. I love it when someone says;

"[...] how to debug it?"

I don't actually have an installation of the Windows 8 setup, and I haven't played with a Windows 8 install either, so I'm going to be assuming that there are some fundamental similarities to its predecessors. I'll try to call out assumptions as I make them.

Calling the shots

My guess, based on your description of the problem, is that the system is failing to record the proper entries in the registry so that when you run "open" after previously doing "open with..." you will see the application that you selected last time.

I will walk you through your issue and prove or disprove my initial guess. If you don't need all of my verbosity below you can skip/scan down to the Recon section where we start trying to uncover the issue.

Quick fixes

Before we get into the more involved steps described below you should first investigate the Default Programs interface found in the Control Panel. You can get a similar effect going through the "open with..." menu, but you already said that was not working for you. **Make sure you are setting the checkbox that indicates to remember your setting as the default application for whichever application you have selected.

Under the Default Programs interface in the Control Panel there might be options for you to "reset defaults" or revert to a previous version. You can consider these various options to see if they solve your problem. Do these first, because they will be the easiest fixes. If they are not working then you should continue on to the options below.


Assumptions

These are the assumptions that I foresee. If any of them are way off base, then please let me know and if I have to I will take the time to set-up a Windows 8 install.

The Registry

I think the biggest assumption that I'm making is that the OS still uses the registry and for places where I give examples I'm assuming that the registry directory layout/structure in Windows 8 is similar to its predecessors too.

Cmd.exe

Personally, I often prefer a command prompt so I will probably describe steps in the context of a terminal session. I'm assuming that Windows 8 still has cmd.exe; I'd be really surprised if it didn't.

Registry Editor

If there is a registry, then there is probably a tool to view/edit the registry. I'll be assuming that the name of the GUI and commandline tools are the same as they were in the predecessors.

User Privileges

I will assume that the ways to invoke shell's with elevated privileges are similar enough to the OS predecessors that you will know what to do. If I am off-base here just ask me for some elaboration and I'll do what I can.

SysInternals Suite

I would be extremely disappointed if these were not available in Windows 8. I can't believe that they would not be available because they are so fundamental to the developer/QA cycles that Microsoft and third-party developers go through.

WinDbg.exe, DDKs, and SDKs

I assume that you don't already have these installed. That's fine. We probably can solve the issue without requiring those heavy-duty tools. Go through the Recon section first and if you need (or just want) to go deeper, then will talk about these tools.

Recon

Always try to accomplish your task by the simplest means possible first. Starting with the Windows Debugger would be overkill for a starting point, and it would be a little more difficult to spot the piece/sequence of events that are relevant.

If you haven't already downloaded and installed The SysInternals Suite, then you should do that now. At the very least you will need Process Explorer and Process Monitor for the first attempts at spotting what's going wrong. Both of these tools are part of the suite, which you can download as a *.zip file, but if you have a poor network connection then you might choose to download the two tools individually to get it done faster.

Unzip the suite/tools to an appropriate place on your system (largely your personal preference). If you are using the default Windows unzip utility, then you will want to remove the Zone file before unzipping the archive. The zone file is how the OS knows "this file was downloaded from the Internet [...] run at your own risk [...] uncheck box to [...]". I'm sure you've seen a message similar to that in a pop-up box before. There is usually a little checkbox in the bottom left of the pop-up that will remember your decision going forward if you toggle it once.

Another way to see that checkbox is to right-click -> Properties on the file you downloaded. The checkbox should be at the bottom of the General tab. Toggling that checkbox once will remove the zone file from the binary (as a side note, the zone file is stored in an alternate data stream of the binary in question - but that's another discussion. For now, just use the pop-up windows or file properties interfaces to manipulate zone files.

Make sure you remove the zone file from the *.zip archive before unpacking it with the default Windows zip tool. If you don't remove it from the *.zip file then the ZIP utility will mark each unpacked file with a zone file and then it will be a pain getting the pop-up window for ever binary you run in the suite.

There are two tools that we are going to start with: * Process Explorer (procexp.exe) * Process Monitor (procmon.exe)

You can reference the corresponding *.chm file if you want to learn more about them. We are going to start with Process Explorer and if we can't quickly spot the issue then we will move to Process Monitor (which is a little more involved to run), and if we still can't resolve the issue then we will talk about pulling out the big guns. The fact is, though, that I often find what I need to know in the recon phase and don't need to start-up the debugger.

Background and Understanding

The registry is where the system stores the mappings that relate file extensions to the applications that know how to handle them. For example, you can use the command-line tools ftype and assoc to view/manipulate the mappings for extensions to applications.

To see the filetype associated with the extension ".txt" execute the following command from a terminal.

$> assoc .txt
.txt=txtfile

This indicates that the .txt file extension is assigned to the txtfile class of filetypes. Then to see the application that is associated with the txtfile class, execute the command

$> ftype txtfile
txtfile=%SystemRoot%\system32\notepad.exe %1

These tools are just reading the registry settings for the system. You can view them yourself with a tool like reg.exe which you would execute from a terminal or most people would prefer the GUI registry editor regedit.exe. At that location you will see some of the extensions, filetype classes, and application associations you would simply look up under the HKEY_CLASSES_ROOT hive. Directly under that hive you should find a key for both ".txt", as well as, "txtfile" and of course much, much more.

Here are some more examples of using the assoc and ftype utilities.


Make sure you are feeding extensions to assoc. I think you already know this, but to be clear file extensions are the "dot followed by 3 or 4 characters" that terminate a file name. For example, application.exe, document.txt, or presentaion.ppt. The assoc utility expects you to provide the "." and the 3/4 characters as its parameter.

$> assoc .exe
.exe=exefile
$> assoc .txt
.txt=txtfile

Separate and distinct from the file extension there is the file type. Multiple file extensions can be grouped into a single file type. Consider how ".html" and ".htm" map to the same filetype; that is, "htmlfile". The example below tries to demonstrate this point further.

$> assoc .html
.exe=htmlfile
$> assoc .htm
.txt=htmlfile
$> ftype htmlfile
htmlfile="C:\Program Files (x86)\Internet Explorer\iexplorer.exe" -nohome

Further, notice that the registry contains the following keys under the HKEY_CLASSES_ROOT hive.

  • HKCR.html
  • HKCR.htm
  • HKCR\htmlfile

If there is a convienent way for you to upload/attach/share a txt file then run the following commands, and I will look at the output they create.

$> cd \somewhere\easy\for\you\to\find\
$> assoc > extension_associations.txt
$> ftype > filetype_handlers.txt

You should now be able to open the folders that you wrote those files into and share them. The following commands should open the files too (if you can seem to find the files you created).

$> notepad \somewhere\easy\for\you\to\find\extension_associations.txt
$> notepad \somewhere\easy\for\you\to\find\filetype_handlers.txt

If you can't share whole *.txt files with me, then at least run these two commands and just put their results into the comments.

$> assoc .txt
.txt=textfile
$> ftype textfile
textfile="C:\Program Files (x86)\Notepad++\notepad++.exe" "%1"

If you don't see anything there then you should start by setting it to something. Make sure you have elevated privileges (that is, administrator privileges) when you make those changes, otherwise they probably won't work how you expect.

Process Explorer

TODO if needed

Process Monitor

TODO if needed

Installing Windows Debugging Environments

GuyHoozdis

Posted 2012-10-21T00:08:38.783

Reputation: 381

Three things: 1) thanks for the long answer. 2) I thing there is something else going on, as ftype says there is nothing associated with any extension that I throw at it. 3) The program that I want to associate is Word 2013, which is a service, not an exe per se (or if it is, I have no idea where it is, task manager shows a service running).

Any thoughts? – soandos – 2012-10-28T18:43:47.307

No problem.

Make sure you are feeding extensions to assoc. I think you already know this, but to be clear file extensions are the "dot followed by 3 or 4 characters" that terminate a file name. For example application.exe, document.txt, or presentaion.ppt. The assoc utility expects you to provide the "." and the 3/4 characters as its parameter.

$> assoc .exe
.exe=exefile

$> assoc .txt
 – GuyHoozdis  – 2012-10-28T19:17:56.287

ftype .txt gives "File type '.txt' not found or no open command associated with it." for example – soandos – 2012-10-28T20:02:06.320

Passing a file extension to the ftype utility is incorrect. Take a moment to review, and actually preform yourself to improve your grasp of the situation, the example commands that I wrote out in the "UPDATE" to the original post.

After doing that, ask yourself this question "What is the difference between a file type and a file extension? If you don't know read through my examples a second time. If it still doesn't make sense, then we'll try a different approach. – GuyHoozdis – 2012-10-28T21:43:53.887

Windows doesn't have a terminal. It has a Command Prompt and commands don't begin with $ like they do on Unix systems. – Elmo – 2012-10-28T22:14:27.077

@GuyHoozdis, I agree with Root, not sure what I can do this way – soandos – 2012-11-03T23:40:09.220

I upvoted on your answer believing it is technically right, but maybe you should boil it down a little. Not sure if you even used Process Explorer in the answer so asking for the OP to install it seems excessive. (trying to avoid tl;dr scenarios) – Doktoro Reichard – 2013-08-23T17:00:32.720

1

Default Programs Editor can edit the 'Open With...' list on Windows 8:

File Type settings -> Change 'Open with' programs -> Select a file type

default programs editor open with list

Add whatever program you want to 'stick', and click Save.

Note: in the current version, regular desktop apps show up here, so no way to add/remove a Metro app. But it should still solve your question.

Factor Mystic

Posted 2012-10-21T00:08:38.783

Reputation: 11 212

Do you mind pasting the screenshot before this? I can't find this dialog box – soandos – 2012-11-26T02:35:07.133

@soandos it is a hyperlink in the lower left corner of the File Type settings screen – Factor Mystic – 2012-11-26T16:00:58.217

I'm an idiot, I didn't see the download link – soandos – 2012-11-26T16:45:27.410

How can I add word 2013? It is a service, not an executable – soandos – 2012-11-26T18:24:42.043

@soandos It's still installed to your hard drive though. For me Word is installed to C:\Program Files\Microsoft Office 15\root\office15\winword.exe – Factor Mystic – 2012-11-27T00:37:45.497

0

Do an Open With -> Choose Default Program. When the window opens un-tick the "Use this app for all .pdf files, and choose Word to open it with. If it is not in the list, use the "Look for another app on this PC" link at the bottom of the list.

Once you open the PDF file with Word, but do not set it as the default program it should show up in the "open with" context menu next time you use it.

Enter image description here

Moab

Posted 2012-10-21T00:08:38.783

Reputation: 54 203

3It doesn't. Thats my question. Why doesn't it. – soandos – 2012-10-21T01:08:03.547

Are you using RTM W8? Did you read my instructions carefully? – Moab – 2012-10-21T01:09:43.350

RTM, and yes. I made another program the default, then opened it with word, then looked at the open with sub-menu. Still was not there (I am talking about the immediate menu, not the "Choose default menu" without checking the box – soandos – 2012-10-21T01:10:30.050

Not sure what is wrong, works on my Windows 8 RTM. That info is stored in the registry, more than likely a MRU entry. – Moab – 2012-10-21T01:18:49.357

Any idea how to debug it? – soandos – 2012-10-21T01:19:17.620

Probably use process monitor to snapshot the registry when you attempt to change it, not easy to configure if you have never used it before...http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

– Moab – 2012-10-21T01:33:59.017

way to many hits. What am I looking for in particular? – soandos – 2012-10-21T01:45:09.863

All the video tutorials by the Author of the software are no longer available, who knows why, see this article for basics on configuring filters and taking snapshots...http://www.winhelponline.com/blog/process-monitor-track-events-generate-log-file/

– Moab – 2012-10-21T02:47:19.220

They're right... HERE!

– Tamara Wijsman – 2012-10-25T03:53:21.330

@TomWijsman thanks, my old link was dead with no redirect. – Moab – 2012-10-31T15:55:42.523