Windows 7 file extension association

后端 未结 4 1543
心在旅途
心在旅途 2021-02-06 05:59

I am referring specifically to windows 7.

I have code that associates a certain extension with my application as proposed by webJose on the following page: What registry

4条回答
  •  别那么骄傲
    2021-02-06 06:33

    My solution was not to try to delete the UserChoice key (only administrators can do it), but to delete the key the ProgId is pointing to. If the user made a choice in the past the ProgId has a value like Applications\*.exe. The non-admin can delete the key in a batch:

    REG DELETE HKCR\Applications\*.exe /f
    

    This might be a bit of a hack, but worked for me.

提交回复
热议问题