Why are certain default application associations "locked"?

13

5

After associating my MP3 files with MPlayer using the Open with/Choose default program... dialogue I can no longer change that association using said dialogue, the Always use this [...] Checkbox is henceforth always greyed out (Control Panel -> Default Programs -> Associate a file type or protocol with a program does not let me change it either, it seems to just use the same dialogue anyway).

That also happened for MP4 files, but not for MKVs for example, and if I associate my MP3 files with other applications like VLC media player it does not get blocked. Why is that and can I avoid this beforehand (thankfully, I know ways to fix it afterwards already)?

Another obervation: The blocking programs (I managed to block it with an association to Visual Studio as well) do not appear in the Recommended Programs of the open-with-dialogue (And the explorer said: "The current program is not recommended, but I won't let you change it, ha!").

A screenshot:

Screenshot

As you can see on the top left (if you know the icon of MPlayer), the file is currently associated with MPlayer.


Ways to fix it (note: This question is not about fixing it):

  1. Using the Default Programs

    Control Panel -> Default Programs -> Set Default Programs, select WMP, Choose defaults for this program, check .mp3.

    This should reassociate the files with Windows Media Player (WMP), and you can create a new association in Windows Explorer.

  2. Using the registry (as always, keep your hands off it unless you know what you are doing or if you are fine with accidentally breaking your system):

    HKEY_CURRENT_USER -> Software -> Microsoft -> Windows -> CurrentVersion -> Explorer -> FileExts > .mp3

    Here you could for example clean up the open-with-list, and the current default program seems to be saved here as well in the key UserChoice. There you can change the ProgId string to another application, and you can associate it with WMP by entering WMP11.AssocFile.MP3 or just pick another application right away.

    You may need to mess with permissions on the key though, if you cannot change the ProgId value.

(As I now have three answers that do not answer the question: This question is not about getting the association to work again. I do not like fighting symptoms, I prefer cures.)

H.B.

Posted 2011-11-09T01:41:45.710

Reputation: 521

Have you tried uninstalling MPlayer with Revo ?

– harrymc – 2011-11-11T06:44:49.510

@H.B.: Your file names do have file extensions, right? (I've never seen that checkbox get grayed except for when the file name has no extension.) A screenshot of the checkbox might be helpful. – user541686 – 2011-11-11T07:06:45.173

How do you fix it? You said you know ways... – utapyngo – 2011-11-11T10:26:31.010

@harrymc: This seems only like a way to fix it and i do know how to alreay. – H.B. – 2011-11-11T14:20:58.390

@Mehrdad: Added a screenshot, i doubt it'll help (but it shows some great mp3s). – H.B. – 2011-11-11T14:21:44.647

@utapyngo: Added two ways to the question. – H.B. – 2011-11-11T14:22:18.343

Found a duplicate question on Stack Overflow with a solution. http://stackoverflow.com/questions/2543254/how-to-enable-always-use-the-selected-program-to-open-this-kind-of-file-option

– Dracs – 2011-11-11T15:24:45.450

2Why have you added answers to the question? remove and post them as answers? – Pricey – 2011-11-11T15:37:56.953

If you expand 'other programs', can you not select another program? And you should be able to check the box by selecting another program, no? And another way is to right click the file while holding SHIFT and selecting Open With->program or other – Canadian Luke – 2011-11-11T15:46:47.363

2@PriceChild: The question is not how to change that, read the second paragraph, hence those are not answers. – H.B. – 2011-11-11T17:01:17.350

1@Dracs: That is not my question, i want to know why that is, not how to fix it. – H.B. – 2011-11-11T17:01:58.847

@Luke: The checkbox is never enabled, no matter which program i select. – H.B. – 2011-11-11T17:06:22.163

@H.B.: Might this be a permission issue? Maybe it grays out the checkbox because you're not an Admin or something? – user541686 – 2011-11-15T11:23:17.367

@Mehrdad: That'd be quite odd, wouldn't it? As it only happens for certain file types in combination with certain programs, so the program with other file types works, or another program with the same file works as well. Why would i be able to set it once in the first place? I tried harrymc's recent answer and even as admin it seems to get locked if that dialogue reliably represents the current state. – H.B. – 2011-11-15T16:04:04.113

Answers

4

It seems that the forum post Cannot set file association - option greyed out has the answer:

In HKEY_CLASSES_ROOT\Applications\regedit.exe there is a REG_SZ 0value called NoOpenWith

Check if you have this value in your registry.

If so, the real question is: why is there such a value and which program set it?

kamaradclimber

Posted 2011-11-09T01:41:45.710

Reputation: 113

The respective key is not being touched and even if it were, this would just be yet another fix, which is far from what i am asking for here, "registry key X was changed" does not explain anything, it's too far down the chain of events. – H.B. – 2011-11-17T18:05:18.323

1this would have been the key to understand because it would have meant a specifiic program has blocked the openwith case on purpose (not just a vicious bug) – kamaradclimber – 2011-11-18T06:43:01.833

The programs do not do anything with those keys, only Windows itself, and why it happens is still a mystery it seems... – H.B. – 2011-11-18T13:23:47.627

I had a similar problem but with Outlook, removing NoOpenWith from HKEY_CLASSES_ROOT\Applications\Outlook.EXE resolved my problem. – Corin – 2012-04-11T07:54:58.393

1

MPlayer probably edits the registry, changing/creating the registry key you mentioned before (HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explorer > FileExts > .mp3).

Below I will have two separate things you should look at (one has two parts, method A and method B) For Windows Vista, 7 or Server 2008

Method A

  1. Type regedit in RUN dialog box and press Enter. Now goto:

    HKEY_CLASSES_ROOT\Unknown\shell\opendlg\command
    
  2. In right-side pane, change value of "Default" key to as following:

    %SystemRoot%\system32\rundll32.exe
    %SystemRoot%\system32\shell32.dll,OpenAs_RunDLL %1 %2
    

    Note: We have only appended %2 at last of default value. You can use any number from 2-9.

  3. Exit registry editor and try to open "Open With" dialog box. You'll find that the checkbox is disabled now as shown in following screenshot:

    Open_with_disabled.jpg

Method B

  1. Type regedit in RUN dialog box and press Enter. Now goto:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
    

    If the "Explorer" key is not present, create it manually.

  2. Now in right-side pane, create a new DWORD value NoFileAssociate and set its value to 1

  3. Exit registry editor and try to open "Open With" dialog box. You'll find that the checkbox is completely removed now as shown in following screenshot:

    Open_with_invisible.jpg

NOTE: As you can see, when we use Method A to disable the checkbox, the "Open With" dialog box doesn't show recommended programs list which it does when we use Method B. Also if you see the last screenshot of Windows Vista, the Method B totally remove the checkbox instead of disabling it.

BONUS TIP: This tutorial can also be used in reverse condition. e.g. if this checkbox is already disabled in your Windows and you want to enable it, then you can remove the %2 mentioned in Method A or set value of DWORD value to 0 as mentioned in Method B.

THING TO LOOK AT 2: To prevent the registry key from being modified, you can restrict the permissions (you may need to do this after you install MPlayer).

Here's how:

  1. Navigate to the registry key you want to change (and click on it).
  2. Click Edit (on the top menu).
  3. Click permissions.
  4. Click advanced.
  5. Select the appropriate group (ex. SYSTEM, ADMINISTRATORS(...)
  6. Click edit.
  7. Deny permission to "Set Value".
  8. Click OK... and close all the windows you just opened.

wizlog

Posted 2011-11-09T01:41:45.710

Reputation: 12 320

MPlayer is a "nice" program, it does not screw with the registry as far as i know, in fact all i am doing is setting an association. So i do not think this answers the questions in any way and i doubt that you should be using pictures which have a large copyright watermark from another site on them. – H.B. – 2011-11-11T17:05:53.520

The only way for a program to change file associations, is to use the registry. Follow my answer, see if it works. – wizlog – 2011-11-11T17:37:53.123

I am not trying to create or fix that effect, please re-read the question. – H.B. – 2011-11-11T17:52:50.593

Have you ever thought about permissions? maybe since Mplayer sets the permissions as system/administrator you as in the un-UAC elevated user cannot change the key... You should check your permissions on the registry keys wizlog provides. – Supercereal – 2011-11-12T19:36:27.540

@Kyle: MPlayer does not do anything, windows does, and it should not matter what application i associate something with, yet it does. – H.B. – 2011-11-12T20:44:26.263

1Well then there must be something different with Mplayer... but I guess if you know it all then don't bother checking the permissions. – Supercereal – 2011-11-12T21:35:32.783

@H.B. If you want our advice, take it. Don't discredit an answer when your the one looking for help. – wizlog – 2011-11-13T14:41:55.270

1@wizlog: I am not looking for help, i am looking for knowledge but everyone here jumped the gun and wanted to help by fighting symptoms. I know very well how this site works, and if you miss the point of my question i may tell you that and if you still think that you adequately answered the question then there is nothing else i can do about that. – H.B. – 2011-11-13T15:39:05.700

@H.B. Then please reiterate what exactly it is you'd like to know. – wizlog – 2011-11-15T00:35:06.177

1@wizlog: It's in the question, it has been there from the very start but people must have not read it. I want to know why it locks and possibly how to prevent it, i do not need a fix for the lock itself. – H.B. – 2011-11-15T01:18:10.680

@H.B. OK. It locks because a registry key was changed. Do you want me to explain to you how the registry works? – wizlog – 2011-11-15T01:21:29.760

@wizlog: It does not, you can associate with certain other applications and it will not lock, and you can associate certain other file types with the same application and it will not lock either, so there are some weird internal mechanics which cause this problem and it should be obvious that it should not happen at all. Hardly a case of the registry being the registry. Also see the bounty note, i am not the only one wondering just what is going on there. – H.B. – 2011-11-15T01:24:33.313

0

It would appear that something is locking the registry key to prevent it from being modified.

There are a few possibilities: the permissions on the registry key or keys are owned by someone other than the current user (which would probably have been set during installation); something is running periodically to check & reset the permissions; or something is actively monitoring the key(s) to prevent modification.

Start by examining the permissions on the key to see if it's a permissions issue. You'll probably have to run regedit as administrator. (Start-> type regedit into the search box, then right-click and select "Run As Administrator"). There may be something obvious like your user account not having write access. Add the appropriate permissions, and see if that fixes the issue.

If it doesn't, or the permission goes away after a reboot or a period of time, you'll need to dig a bit deeper. I would start with this article, install Process Monitor, and enable boot logging. That will tell you if something is setting the key during the boot process. If it's a periodic reset, you can leave the process monitor running after manually changing the registry values to what you want them to be to capture whatever is messing with the settings.

As always, be careful when messing in the registry. Make a backup before changing anything, since it's possible to render the system unusable.

chris

Posted 2011-11-09T01:41:45.710

Reputation: 8 607

Permissions should not be an issue, i checked them before and after the lock and the user account never had set rights to begin with, it's done through the system it seems. Further i doubt that there is anything going on during booting either. – H.B. – 2011-11-13T17:26:27.010

Process monitor might be helpful in tracking the changes though... – H.B. – 2011-11-13T17:30:23.440

1If the user account doesn't have rights to modify the keys, that's why the checkbox isn't enabled, no? If you add your user to the permissions for the key, then it should be enabled. – chris – 2011-11-13T17:47:45.693

No as i said even when i can set the checkbox my user accout does not have set rights on that key, hence it should not matter for file association. My take on it is that i tell the system to change the key through the explorer and the system can change any key. – H.B. – 2011-11-13T17:51:22.750

0

I assume that MPlayer messed-up your registry as regarding content and permissions.

"Always use the selected" may be grayed-out because a permissions-change on the registry could have required Administrator permission. To verify, "Run as Administrator" the Command Prompt (cmd), and enter the following :

%SystemRoot%\system32\rundll32.exe %SystemRoot%\system32\shell32.dll,OpenAs_RunDLL xxx.mp3

This should open the "Choose default program" dialog on a dummy mp3 file.

See if "Always use the selected" is now no longer grayed-out. If this is the case, then your question is answered and this is the result of an honest error by MPlayer (or not).

harrymc

Posted 2011-11-09T01:41:45.710

Reputation: 306 093

The association is done by a system dialogue so MPlayer (or Visual Studio which does the same) should have anything to do with it, the box is greyed out when calling that command as an admin as well. And if it were not that would still not explain why it happens as this is completely in the hands of windows. – H.B. – 2011-11-15T15:55:01.323

In this case Windows=Registry. It would be nice to know how MPlayer messes-up the registry, but after this post I don't dare install it. You should really right-click the mp3 registry entry and see which accounts are authorized before and after MPlayer installation. – harrymc – 2011-11-15T16:33:33.757

I missed a "not" in my comment, MPlayer does not do anything, and as it happens for Microsoft Visual Studio as well i doubt that this is a case of "dubious programs messing up the registry". And as noted elsewhere, on the UserChoice key my account does never have set rights, no matter if i can set the association or not (i.e. the checkbox is greyed out). – H.B. – 2011-11-15T16:55:05.743

Does this also happen when you boot in Safe mode ? If not, then this is caused by some startup application and can be found. – harrymc – 2011-11-15T18:17:24.797

-1

Let's try this:

  1. Open Regedit.exe
  2. Navigate to the subkey HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts

  3. Scroll down and find the file extension you are having problems with (.mp3).

  4. Expand it to view its sub keys.

  5. Find a sub key called "UserChoice" and delete it.

Repeat steps 3 to 5 for each file extension causing you problem

Source: an answer to Stack Overflow question How to enable “Always use the selected program to open this kind of file” option in the open-with-dialog box?.

user65130

Posted 2011-11-09T01:41:45.710

Reputation: 203

2This is still not what i am asking for here... – H.B. – 2011-11-12T19:01:11.560