change file type association with SetUserFTA

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
User avatar
haichen
Posts: 631
Joined: 09 Feb 2014, 08:24

change file type association with SetUserFTA

04 Sep 2022, 11:06

Recently I tried to bind pdf directly (commandline, Windows 10) to Adobe Reader. Without success.
Only via the properties of a pdf file or the settings for the default apps it is possible to change the program association.
With :

Code: Select all

ASSOC .pdf
.pdf=AcroExch.Document.DC
ftype .pdf=AcroExch.Document.DC="C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" "%1"
this is no longer possible.
In the registry there is still a hash in the userchoice, which cannot be calculated easily.
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice
At https://kolbi.cz/blog/2017/10/25/setuserfta-userchoice-hash-defeated-set-file-type-associations-per-user/ you can read about this.
He also built a command line tool with which you can make these changes anyway.
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: change file type association with SetUserFTA

06 Sep 2022, 04:26

Alternative:

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/export-or-import-default-application-associations?view=windows-11

Create an XML with the following content and save it (e.g. C:\defaultassociations.xml)

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<DefaultAssociations>
  <Association Identifier=".pdf" ProgId="AcroExch.Document.DC" ApplicationName="Adobe Acrobat Reader DC" />
</DefaultAssociations>
Use DISM command and import the xml.
DISM /Online /Import-DefaultAppAssociations:C:\defaultassociations.xml

Or with GPO:
https://docs.microsoft.com/en-us/internet-explorer/ie11-deploy-guide/set-the-default-browser-using-group-policy


More ref:
https://techcommunity.microsoft.com/t5/ask-the-performance-team/how-to-configure-file-associations-for-it-pros/ba-p/1313151
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
haichen
Posts: 631
Joined: 09 Feb 2014, 08:24

Re: change file type association with SetUserFTA

06 Sep 2022, 09:28

Thanks for the hints. I had tried the DISM import without success. Unfortunately it does not work.
I read somewhere that this works once with a newly set up Windows.
I have not tested the GPO yet.

Code: Select all

SetUserFTA.exe .pdf AcroExch.Document.DC
works immediately :-)

Windows 10 Pro
21H2 10.0.19044.1949
AutoHotkey: 1.1.34.04.

Return to “Other Utilities & Resources”

Who is online

Users browsing this forum: No registered users and 15 guests