I want to create a file association that recognizes whether an association for a custom file extension has already been set or not.
How do I achieve this task?
If you want to verify if a search finds any value on your machine or not, you can use the "Test Search" toolbar button.I have tried this approach but I don't know how to validate the "search property" within the condition editor.
The "Validate" button from the "Edit Condition" dialog only tells if that condition is spelled correctly, it does not tell if it is True or False.There is the possibility to check for an existing registry key with the search which I did, but the condition editior always returns TRUE when prevalidating. There must be something wrong with my approach.
The association for an extension is set in the registry under the "HKEY_CLASSES_ROOT" key. You can study about this in the "File Types and File Associations" articles.Also, how do I properly check for the association? Or how/where do you set the association in the registry?
I found a .myextension key with a value of "myextension_auto_file" .
There also is a key "HKEY_CLASSES_ROOT\Applications\MyApp.exe\shell\open\command" with a value of "C:\Projects\MyApp\bin\MyApp.exe" "%1".