topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 5:53 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Fixing File Associations (PDF)  (Read 11190 times)

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
Fixing File Associations (PDF)
« on: December 04, 2015, 04:54 AM »
Windows 7 x64

I'm having persistent trouble with PDF file associations: *sometimes* PDF's open in Windows Media Player. Usually it's when another programme tries to open a PDF, currently Softmaker is the culprit, but I've had the same problem with other software, so I know this is not a Softmaker issue.
I have found no helpful tips online (some others have the problem, but get the usual - set default file associations e.g. via file context menu, which makes no difference).

So I'm asking here :-)

Starter Question is:
where in the REgistry do I set file associations *and* how exactly do I do it ?
=>
IIUC default file associations are here:

HKEY_CLASSES_ROOT\.pdf\

Here's a screenshot:

Screenshot - 2015-12-04 , 11_14_35.png

The persistent handler is:
HKEY_CLASSES_ROOT\.pdf\PersistentHandler
=> (Default) - REG_SZ - {F6594A6D-D57F-4EFD-B2C3-DCD9779E382E}

The shell ex is:
HKEY_CLASSES_ROOT\.pdf\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}
=> => (Default) - REG_SZ - {DC6EFB56-9CFA-464D-8880-44885D7DC193}
This bit may be irrelevant:
When I search for this {DC6EFB56-9CFA-464D-8880-44885D7DC193} (from shell ex key) I get lots of hits about why preview doesnt work in Outlook. I dont know if this is relevant as I dont use or have Outlook.
https://duckduckgo.c...85D7DC193}&ia=qa

_________
Windows 7 x64
Tom
« Last Edit: December 04, 2015, 05:04 AM by tomos, Reason: OS details »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: Fixing File Associations (PDF)
« Reply #1 on: December 04, 2015, 05:18 AM »
Since you've got DOpus you might find it easier to do it in there, Settings->File Types->System File Types

2015-12-04 22_23_58.pngFixing File Associations (PDF)

That's usually how I end up fixing associations that screw up.
« Last Edit: December 04, 2015, 05:27 AM by 4wd »

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
Re: Fixing File Associations (PDF)
« Reply #2 on: December 04, 2015, 05:40 AM »
Since you've got DOpus you might find it easier to do it in there, Settings->File Types->System File Types

[ Invalid Attachment ]

That's usually how I end up fixing associations that screw up.

that was interesting -- even though it (Dopus) shows the Adobe Acrobat icon and states: "Opens with: Adobe Reader", when I go to edit as per your screenshot, it had the following for open:
"C:\Windows\eHome\ehshell.exe" "%1"
which turns out to be Windows Media Center ...

Thanks for the tip -- I think it need a log-off or reboot before it works -- will report back later :up:

EDIT// it wasn't working because I put "1%" instead of "%1" after the exe path :D
All seems to be fixed now, very painless thanks to your help :up:
Tom
« Last Edit: December 04, 2015, 07:32 AM by tomos »

ajlixx

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 10
    • View Profile
    • Donate to Member
Re: Fixing File Associations (PDF)
« Reply #3 on: December 08, 2015, 12:42 PM »

actually default file associations are not in the key for file extension, ie in HKEY_CLASSES_ROOT\.pdf\

they are little below in the key HKEY_CLASSES_ROOT, in the key for so called friendly file name - friendly file name is the name in the default value of the extension key, so on the post 1 screenshot pdf_auto_file is friendly name for pdf file

exactly, they are in the subkey shell\open\command of this friendly name key

friendly name is variable, every aplication can create its own friendly name and register by creating key in HKEY_CLASSES_ROOT (but not necessarily change value default in extension key)   

but of course default associations are only valid for user account, so one friendly name key often cannot be used as data source for many accounts - if i can judge from my experience primary key for account default association is key

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts

it is primarily key for context menu open with, but if in extension key in this key are values application or progid with data they are used as default - progid serves as link to friendly name key in HKEY_CLASSES_ROOT; if in extension key is subkey openwithprogid it also serves as default program data source with link to friendly name key; in value application is only application name, not its path, so, i guess, this application must have key in key HKEY_CLASSES_ROOT\Applications for this link to work

to complicate the picture there are keys classes in HKEY_CURRENT_USER\Software and HKEY_LOCAL_MACHINE\Software, that contain some of the HKEY_CLASSES_ROOT keys - friendly name in classes in current user may be other then in classess root, it has preference before HKEY_CLASSES_ROOT; in windows from 8 this key in current user is probably default for user associations

i think explorer searches for ways to open file in account registry hive, if there isn`t specific data in keys in current user it searches for data for opening in key HKEY_CLASSES_ROOT or its copy in HKEY_LOCAL_MACHINE\Software, so actually HKEY_CLASSES_ROOT is last on the data queue list

friendly name key has this advantage that it can serve for many extensions, for exemple various sound\video extension can have only one friendly name

i must add that i am not programmer, these are only guesses from many years of my struggles with windows

while writing this post i tried to check my guesses - i have some docx files, and because i have xp, in
HKEY_CLASSES_ROOT there isn`t extension key for docx - but such key is in Explorer\FileExts, because i added programm for opening docx file to open with - if i just clicked on file it opened in notepad - now i added default programm through file properties - in docx key in subkey openwithprogids appeared value docx_auto_file -
when i restarted regedit and checked in HKEY_CLASSES_ROOT, sure, there is key docx auto file with path to tmviewer; checked second time and in CLASSES_ROOT appeared also key .docx with docx auto.. as friendly name

on post 1 screenshot there is key openwithprogids - i think this is proper key for default application, not persistenthandler, etc - if there is this key with friendly name and another friendly name as default value in extension key default value has priority

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
Re: Fixing File Associations (PDF)
« Reply #4 on: December 08, 2015, 03:09 PM »
thanks for those details ajlixx :up:
I was still curious,
and you are correct:
HKEY_CLASSES_ROOT\pdf_auto_file\shell\open\command
has the value:
"C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe""%1"

Re the other one:
HKEY_CLASSES_ROOT\.pdf\OpenWithProgIDs
you say:
i think this is proper key for default application, not persistenthandler, etc - if there is this key with friendly name and another friendly name as default value in extension key default value has priority

I'm not sure what you mean there -- is it that this one has priority over the pdf_auto_file one above? (FWIW it has a 'Default' key with 'value not set'.)
Tom

TaoPhoenix

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 4,642
    • View Profile
    • Donate to Member
Re: Fixing File Associations (PDF)
« Reply #5 on: December 08, 2015, 03:26 PM »

Skipping Win Media Player, re file associations, I've found that apps "grab" file associations sometimes even when there's no button for "set as default". So I wonder if this all goes on with PDFs.


tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
Re: Fixing File Associations (PDF)
« Reply #6 on: December 21, 2016, 08:55 AM »
today, PDF's, when opened indirectly (i.e. called by another software e.g. via a link in spreadsheet, or say Help file via menu) they open via my default browser (PaleMoon). The browser opens the file as if it was being downloaded.
I am bemused, to say the least :huh: ;D

Since you've got DOpus you might find it easier to do it in there, Settings->File Types->System File Types

[ Invalid Attachment ]

That's usually how I end up fixing associations that screw up.

that was interesting -- even though it (Dopus) shows the Adobe Acrobat icon and states: "Opens with: Adobe Reader", when I go to edit as per your screenshot, it had the following for open:
"C:\Windows\eHome\ehshell.exe" "%1"
which turns out to be Windows Media Center ...

I checked DOpus as per 4wd's screenshot and unlike my last experience, it seems to have correct path:
"C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe""%1"

I'll shutdown later and report back tomorrow if that fixes it.
Otherwise will go rooting around in the registry.
Tom

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: Fixing File Associations (PDF)
« Reply #7 on: December 22, 2016, 04:07 PM »
also remember that pdf originally is listed as Portable Document Format (PDF), not pdf or Adobe- or something- pdf
so you may not have scrolled long enough down the page!

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,964
    • View Profile
    • Donate to Member
Re: Fixing File Associations (PDF)
« Reply #8 on: January 04, 2017, 09:53 AM »
today, PDF's, when opened indirectly (i.e. called by another software e.g. via a link in spreadsheet, or say Help file via menu) they open via my default browser (PaleMoon). The browser opens the file as if it was being downloaded.
I am bemused, to say the least
[..]
I'll shutdown later and report back tomorrow if that fixes it.

I forgot to check this after rebooting...
Have updated windows since, and no longer have the problem -- so cant say what fixed it, nor what broke it :-\ but at least it working now
Tom