我想在Windows启动时启动程序 [英] i want start up the program when windows starts

查看:88
本文介绍了我想在Windows启动时启动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
对所有人
(C#.net Windows应用程序)
我想在Windows启动时启动Windows程序,所以我想要它的示例代码
感谢所有

hi
to all
(C#.net windows application)
i want start the windows program when windows starts so i want the sample code for it plz
thankq for all

推荐答案

没有代码.

如果要在Windows启动时启动应用程序,则必须将应用程序编写为Windows服务.

如果要在用户登录时启动应用程序,则需要在命令行运行"项中放入命令行以启动应用程序.
There is no code for this.

If you want your app to start when Windows starts, then you have to write your app as a Windows Service.

If you want your app to start when a user logs in, then you need to put the command line to start your app in the Registry Run key.


这是操作系统的功能.因此,您需要在操作系统中进行设置.做到这一点的方法是通过注册表.
您可以将此条目添加到注册表中,作为安装程序的一部分.但是,安装它的用户将需要管理员权限.
This is a function of the operating system. So you need to set it up in the operating system. The way to do it is through the registry.
You can add this entry to the registry as a part of your installation program. The user installing it would need admin rights though.


这篇关于我想在Windows启动时启动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆