I'm developing a system in java, but from it I should change the default program to open .pdf on the switch. In Windows 10 it opens by default on the Edge, however from the system it should change to Adobe.
I've already tried cmd with the assoc command (restarting the computer later):
assoc .pdf=AcrodRd32.exe
or
assoc .pdf=AcroExch.Document.DC
I've also tried through regedit with the script (also restarting the computer later):
===================
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.pdf]
@=".pdf=AcroExch.Document.DC"
"Content Type"="application/pdf"
[HKEY_CLASSES_ROOT\.pdf\OpenWithList]
[HKEY_CLASSES_ROOT\.pdf\OpenWithList\AcrodRd32.exe]
@=""
===================
I tested the script in HKEY_CLASSES_ROOT.pdf \ as in HKEY_CLASSES_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ FileExts but none worked.
I believe that direct from java has no way to change. Anyone have any ideas how to make this change?