文件关联 - 在 Vista 上修改 shell 的编辑动词
我希望以编程方式修改 Vista 上 shell 的 edit 动词。 例如,我想右键单击编辑(在资源管理器中)以使用 Notepad++ 打开 .cs 文件。
如何在 Windows Vista 上更改文件关联?
I'm looking to programmatically modify the edit verb for the shell on Vista. For example, I want right click edit (in explorer) to open a .cs file w/ Notepad++.
How do I change a file association on Windows Vista?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为此,您需要管理登录,因为您必须修改 HKEY_CLASSES_ROOT。 查找与 .cs 文件关联的注册表项; 你会发现类似“C# 源代码文件”的描述(尽管可能不是这样;我现在不在安装 VS 的机器上进行检查)。 该键将指向另一个键(对于 MS,它通常是 GUID),它是存储编辑、打开等设置的位置; 这就是您需要进行更改的地方。
这应该可以帮助您开始,除非 Rob 猜错了,并且您最初的意思并不是“以编程方式修改”。 :-)
You'll need Administrative login for that, since you have to modify HKEY_CLASSES_ROOT. Find the registry key associated with .cs files; you'll find a description like "C# Source Code File" (although probably not that; I'm not on a machine with VS installed right now to check). That key will point you to another one (with MS, it's usually a GUID) which is where the settings for edit, open, and so forth are stored; that's where you'll need to make your changes.
That should get you started, unless Rob guessed wrong and you didn't mean "programmatically modify" in the first place. :-)