-1

I am making an app in C# and I need to assign an app for my file extension (.cstmdb). I already searched for solutions but all the solutions (assoc and ftype, Registery) requires elevated rights and the users of the application won't have elevated rights. I found some pieces of information for "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts" (don't requires admin rights) but I can't make it work. Regedit I don't have the ProgId or the the Hash of my application.

Another possibility is to use "C:\Windows\System32\OpenWith.exe C:\myFile.cstmdb" which opens the dialog to choose the default app for the extension (same as right clicking on the file and "Open with...") but I haven't found any documentation on how to do everything programmatically.

Thanks a lot !

Greenkiller
  • 200
  • 2
  • 12
  • 1
    afaik it should be the key `HKEY_CURRENT_USER\Software\Classes`. Please take a look [here](https://stackoverflow.com/a/2069565/2590375) and [here](https://learn.microsoft.com/en-us/windows/win32/shell/fa-sample-scenarios?redirectedfrom=MSDN). – nilsK Jan 07 '21 at 09:49

1 Answers1

0

Okay thanks to nilsK I started to look at the correct location. The first link is not for windows 10 and the second link is exactly what I was looking for.

Greenkiller
  • 200
  • 2
  • 12