文件关联 - 在 Vista 上修改 shell 的编辑动词

发布于 2024-07-14 01:47:53 字数 143 浏览 3 评论 0原文

我希望以编程方式修改 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

随心而道 2024-07-21 01:47:53

为此,您需要管理登录,因为您必须修改 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. :-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文