0

I have the string of the file extension. And I think the question is self explanatory

Edit:
- unknown to the computer (windows); A file for which there is no default program installed

6
  • It isn't. What does 'unknown' mean? Unknown to who? Some list you have? Windows? Google? Commented May 15, 2016 at 17:29
  • What exactly do you mean by "unknown file type"? A file for which there is no default program installed? Commented May 15, 2016 at 17:29
  • The string of "the" file extension. What file extension? Commented May 15, 2016 at 17:31
  • @ChrisF A file for which there is no default program installed Commented May 15, 2016 at 17:33
  • check this answered question for some lead. link Commented May 15, 2016 at 17:37

1 Answer 1

2

Directly under HKEY_CLASSES_ROOT in the registry there are a series of keys that are common (and not so common) file extensions.

In the first instance if the extension key doesn't exist then it's truly unknown to the system.

Under each of those keys there can be other keys:

  • PersistentHandler
  • OpenWithList
  • OpenWIthProgIds
  • ShellEx
  • etc.

depending on what type of file it is.

The presence of one (or more) of these keys will tell you whether the system can open the file and what program(s) are installed that can.

You access a registry key via the RegistryKey class

For instance if you call OpenSubKey with the name of the extension it will tell you whether it exists or not by whether the call succeeds or fails. If it succeeds you can then check the subkeys to see what program (if any) can open the file.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.