First, get the result of this command:
assoc .pdf
It gives the current association between and its document type. In my case, the output is:.pdf
FoxitPhantomPDF.Document
Based on this output, I created two files:.bat
ftype FoxitPhantomPDF.Document="C:\Program Files\SumatraPDF\SumatraPDF.exe" "%1"
and:
ftype FoxitPhantomPDF.Document="C:\Program Files (x86)\Foxit Software\Foxit PhantomPDF\FoxitPhantomPDF.exe" "%1"
You have to run the files as an admin..bat
Sorry, but there is a problem there:
You can use the command 'assoc' (you will need to run the command in Command Prompt as Administrator to change the association). Despite being an old command it still exists in Windows 10. The details: https://technet.microsoft.com/en-us/library/bb490865.aspx
This is a list of methods to stop Edge from taking over PDF. Hopefully one of them will work for you.
Method 1: Using Settings
.pdfMethod 2: Using Context Menu
.pdf.exe file.Method 3: Using the Control Panel
.pdf.exeMethod 4: Using Registry Editor
regeditNavigate to
HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.MicrosoftEdge_44.18362.267.0_neutral__8wekyb3d8bbwe\MicrosoftEdge\Capabilities\FileAssociations
(the key might change with future Edge versions)
Double-click the key and copy its value, probably
.pdfAppXd4nrz8ff68srnhf9t5a8sbjyar1cr723
Go to the following location
HKEY_CURRENT_USER\SOFTWARE\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723In the right-pane, create two string values (REG_SZ) named
and NoOpenWith with empty valuesNoStaticDefaultVerb
Exit the Registry Editor
Use "Default Programs" to re-associate the file type with your preferred program.
Method 5: Renaming Edge Launcher Files
Navigate to the following directory:
C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe.
It should contain the file MicrosoftPdfReader.exe.Take ownership of the folder
Rename the files and MicrosoftEdge.exe
(if the latter exists) to some other name.MicrosoftEdgeCP.exe
Reboot.