About File Associations

The following article Microsoft Broke Windows 10’s File Associations With a Botched Update appeared recently and states that:

File associations no longer work properly on Windows 10 after a buggy update. Windows won’t let you select certain applications as your defaults.
[…]
For example, here’s what happens when we try setting Notepad++ as our default application for .txt files in Windows 10’s Settings app. Windows just ignores our choice and chooses Notepad as the default.

behavior

It appears that I’ve experienced the same thing on a Windows 10 Enterprise (1803). Just keep in mind that we see in the above gif that only “registered” applications can be set. Applications like notepad++ isn’t registered and cannot be set and used for the .txt file association.

I’ve set successfully a group policy that defines the .pdf file to be opened by Adobe Reader. It’s still there and works fine. I’ve created it using the official guidance from Microsoft and the ProgID found in the Adobe documentation on this page.

Using my Google-fu, I also found the following articles that shed some lights on how the file associations work:

I was not able to define and load a custom xml file where I could set notepad++ as the default .txt handler.

After I removed the anti-tampering protection where Microsoft sets a DENY permission on the
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xxx\UserChoice registry key, I could delete values under that key.

I didn’t need to reverse engineer secret hashes under that key like some known tools (setuserfta) do.

All I did actually is remove anything under the UserChoice, create my own ProgId under the OpenWithProgids key and create its related value under the OpenWithList list.

Bonus: If you use the Reset button under Default Apps, Microsoft will gracefully restore the previous behavior.
With the above function or script, your user (admin or not) is autonomous and can restore his favorite file associations until Microsoft changes the rules…

Advertisements

8 thoughts on “About File Associations

  1. Pingback: A complex solution to the ‘broken file associations’ problem in Win10 1803 @ AskWoody

  2. Thanks for the great script. I had a minor problem when using an extension which was not already associated with a program. The insertion of an If block solved the problem.
    If ($Null -ne $k) {
    $acl = $k.GetAccessControl()
    $null = $acl.SetAccessRuleProtection($false,$true)
    $rule = New-Object System.Security.AccessControl.RegistryAccessRule ($ParentACL.Owner,’FullControl’,’Allow’)
    $null = $acl.SetAccessRule($rule)
    $rule = New-Object System.Security.AccessControl.RegistryAccessRule ($ParentACL.Owner,’SetValue’,’Deny’)
    $null = $acl.RemoveAccessRule($rule)
    $null = $k.SetAccessControl($acl)
    Write-Verbose -Message ‘Removed anti-tampering protection’
    } #End If ($Null…

    • Thanks for reporting it. My bad, I made a wrong assumption about the existence of the UserChoice registry key. I’ve fixed the code in the gist using the Test-Path cmdlet but your fix also works 🙂

  3. Pingback: Microsoft confirms File Association bug in Windows 10 version 1803 - gHacks Tech News

  4. Pingback: Microsoft、Windows 10 Version 1803/1809で発生しているファイル関連付けの不具合を認める | ソフトアンテナブログ

    • What version and branch of Windows are you running?
      The above is a PowerShell function, it doesn’t do anything by itself.
      You should load it (into memory), then you can use/invoke it. The first example in the help of function shows how to associate the .txt with a notepad++ located in the “program files” folder.
      The function is compatible with “Reset” button I mentioned above. Be careful, the “Reset” button is there to restore many file extensions to the Microsoft default recommended values.

      Microsoft has acknowledged there’s a problem with file associations and will fix it. You can also wait for there fix.

  5. Pingback: Microsoft Broke Windows 10’s File Associations With a Botched Update - How to do easily - Learn How to do Tasks Easily

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.