What should I enter in the ProgID field in the fil

2019-07-04 10:51发布

I want my program to be associated with a custom file type so that clicking on a file of that type will open it with my program.

I've seen I can do that by: Properties->Publish->Options->File associations. But I don't know what I should enter as ProgID.

From Wikipedia it seems it's some long number (is there a specific way of choosing it?). From an answer here it seems it's just anything I want.

1条回答
家丑人穷心不美
2楼-- · 2019-07-04 11:10

Just fire up regedit.exe and see how other programs do it. The progids are listed in the HKEY_CLASSES_ROOT. The (Default) value of a filename extension key in the list you see there is the progid associated with the extension. Some common samples:

  • .dll = "dllfile"
  • .exe = "exefile"
  • .ico = "icofile"
  • .txt = "txtfile"

You see the pattern. It isn't required that it looks like this, just a convention. "YourCompany.YourFileType" is fine as well with the advantages of it being more descriptive and avoiding name collisions.

查看更多
登录 后发表回答