What's the Hash in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.\UserChoice?

后端 未结 3 1014
不知归路
不知归路 2020-12-17 10:45

With Windows 8, the user\'s choice for which application to open for a given document type seems to be kept in

HKEY_CURRENT_USER\\Software\\Microsoft\\Window         


        
3条回答
  •  一向
    一向 (楼主)
    2020-12-17 11:00

    Microsoft decided in Windows 8 (probably for security reasons) that users should be able to set default programs only via the built in GUI. I.e. by design, you are not supposed to be able to set default handlers in a script or programmatically.

    The Hash value is used to prove that the UserChoice ProgId value was set by the user, and not by any other means. This works as long as Microsoft keeps the algorithm which generates the Hash, and the mechanism for verifying the ProgId using the Hash, a secret.

    In theory you could figure out the secret to set the Hash (and possibly other hidden OS settings), but you would have no guarantee of it's reliability; the next Windows Update might break your method, for example. You probably just need to adapt to the change, and live with using the new methods Microsoft built in to the OS.

提交回复
热议问题