关于 .net:禁用 Windows shell 扩展 | 珊瑚贝

Disabling a Windows shell extension


我在 Windows 中有以下注册表项,它为我的 .NET 应用程序生成一个 shell 上下文菜单:

1
HKCR\\AllFileSystemObjects\\shellex\\ContextMenuHandlers\\MyShellExtension

当我在 Windows 中右键单击文件时,此扩展会生成一个上下文菜单选项。我可以删除它,这将解决我的问题(当我右键单击文件时,删除 MyShellExtension 键将不再产生上下文菜单,这是我想要的),但是有没有更好的方法来告诉 Windows 禁用这个上下文菜单处理程序而不是删除整个密钥(例如在注册表中的某处设置启用标志),以及如何?密钥引用了在其他地方使用的 GUID,因此必须记住 GUID 可能是一个巨大的痛苦。我也愿意接受程序化解决方案。

  • 尽管有一天您可能打算以编程方式写入这个假设的注册表设置,但”控制 Shell 行为的注册表设置”不是编程主题。


简单的方法是将默认属性值从 {your guid in here} 更改为 _{your guid in here}。当您想要重新启用处理程序时撤消更改。


来源:https://www.codenong.com/26549361/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_9261.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?