Windows – Set the default pdf viewer app in Windows 10 Registry

pdfwindows 10windows-registry

————————————Update——————————
I tried the solution in the first answer, however, since there are Hash under user choice, it won't allow me to edit the value to foxitreader.document


I installed a PDF viewer app called FoxitReader. I can define it as the default pdf viewer app in the settings , but I cannot set it by editing the Registry.

I tried with:
HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/FileExt/.pdf

enter image description here
enter image description here
enter image description here

I also tried HKEY_CURRENT_USER\Software\Classes\MIME\Database\Content Type\application/pdf and set the CLSID to the CLSID of FoxitReader.Document,

Or Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes.pdf\PersistentHandler with the CLSID

or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.pdf

Those do add this app into the Open list, but none of them can set FoxitReader as the default PDF viewer.
When I double click the pdf file, it still ask me to choose an app to open it instead of opening it directly in FoxitReader.

How could I set it as my default PDF viewer app in the Registry?

Best Answer

The default application is in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice . As you state, OpenWithList gives all the choices registered for this filetype. In the example below, it points to PDFXCview.exe, rather than Foxit.

Note that Applications\PDFXCview.exe uses indirection, not the absolute path to the executable. Applications\PDFXCview.exe, in turn, is defined in HKEY_CLASSES_ROOT\Applications\PDFXCview.exe and referenced in \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ApplicationAssociationToasts. A similar association should be set for each installed application, including Foxit.

PDF default application

You might look at Nirsoft's FileTypesMan to explore the file type associations, which can help point you to the correct Registry keys.