我的电脑中的快捷方式
问题描述:
亲爱的朋友们,
我正在使用C#.net。我要做的是在我的电脑中添加快捷方式,以便在用户双击它时运行我的应用程序。
我搜索了很多网上但没有得到预期的结果。
请帮助
Dear friends,
I''m using C#.net. What i''m trying to do is to add shortcut in "My Computer" to run my application when user double clicks on it.
I searched a lot on net but didn''t got the desired results.
pls help
答
我找到了这个教程 http://www.msfn .org / board / add-custom ... ktop-t492.html 用于在我的电脑中添加快捷方式...
但有没有办法以编程方式执行此操作或者有没有C#代码来执行此操作?
I found this tutorial http://www.msfn.org/board/add-custom...ktop-t492.html for adding shortcut in my computer...
but is there any way of doing this programatically or is there any C# code to do this?
@NitinSawant
如果我使用搜索字词,我会通过Google获得最有针对性的答案包括语言。例如:
C#make shortcut 在如何做到这一点上得到了好评。
我也是通过谷歌搜索最佳MSDN搜索,包括MSDN作为搜索字词的一部分:
@NitinSawant
I get my best targeted answers through Google if I use search terms that include the language. For example:
C# make shortcut got several good hits on how to do this.
I also find the best MSDN search is via google by including MSDN as part of the search terms:
您是否尝试生成应用程序的快捷方式?什么是我的电脑与任何事都有关系?您是否正在尝试制作一条快捷方式,将您带到我的电脑中屏幕?
编辑:好的,你可以在代码中进行注册表操作。查看一些有关在C#中使用注册表的教程。您需要完全信任(我认为)才能在注册表中创建密钥。但是,您可以创建所需的值。
Are you trying to produce a shortcut to your application? What does "My Computer" have to do with anything? Are you trying to make a shortcut that brings you to the "My Computer" screen?
Ok, you can do registry manipulation in code. Check out some tutorials on using the registry in C# for examples. You need full trust(I think) to create keys in the registry. But then you can make the values you need.