Creating new file association in Windows 10 by registry

Viewed 676

I'm working on Java application and I want to associate some file extensions with this app. While on older Windows systems (XP, 7) I had no problems - just creating two keys in HKEY_CLASSES_ROOT, for example:

[HKEY_CLASSES_ROOT\.fns]
@="strepFns"
[HKEY_CLASSES_ROOT\strepFns]
@="StrepFns File"
[HKEY_CLASSES_ROOT\strepFns\shell]
[HKEY_CLASSES_ROOT\strepFns\shell\open]
[HKEY_CLASSES_ROOT\strepFns\shell\open\command]
@="\"java -jar C:\\Users\\Norbert\\StrepFns.jar\" \"%1\""

(Of course I'm actually adding those keys into HKEY_CURRENT_USER\Software\Classes.)

Looks like there was some change in how HKCR works. I found many instructions about what's going on and what to do, including both adding HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.fns\UserChoice and removing it, but nothing seems to work.

I must add that I need to do that only through changes in registry and only in HKCU, as other ways will require things like requesting some privileges from users and I want it to work in background, without any user actions required.

Is anyone there who actually understand how file assosciation in Windows 10 works?

0 Answers
Related