绑定运行框命令来启动应用程序
我使用 C# 为我的 Windows 应用程序创建了一个安装程序。安装应用程序后,我希望我的用户在“运行”框对话框中输入命令并从那里启动应用程序。我怎样才能做到这一点?
提前致谢。
I have created an installer for my windows application using C#. After installing the application i want my users to type in a command in Run box dialog and start the application from there. How i can achieve this ?
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您必须将应用程序安装在
PATH
中的目录之一中。这样,当用户在运行框中键入 exe 名称时,应用程序将启动You must install your application in one of the directories that are in
PATH
. This way, when the user types theexe
name in the Run box, the application will launch他们需要输入应用程序的完整路径,例如
%ProgramFiles%\MyFolder\MyApp.exe
。They will need to enter the full path to the application, e.g.
%ProgramFiles%\MyFolder\MyApp.exe
.您必须在应用程序路径中注册您的应用程序:
请参阅查找可执行应用程序以获取更多技术细节。
Raymond Chen 的博客文章 如何运行写字板即使它不在 PATH 上,也只需键入其名称? 也讨论了这个主题。
You have to register your application in App Paths:
See Finding an Application Executable for more technical details.
Raymond Chen'd blog post How is it possible to run Wordpad by just typing its name even though it isn't on the PATH? also discusses this very subject.