Windows启动时启动应用程序 [英] Start application when windows starts
本文介绍了Windows启动时启动应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是VC ++开发人员.我想知道如何开始我的
Windows启动时基于MFC对话框的应用程序.我想以编程方式将此设置设置为默认设置.请提供一些示例代码.
谢谢
Sibi V J
Hi,
I am a VC++ developer. and I want to know that how can I start my
MFC dialog based application at the time of windows starting. I want to programmatically set this settings as default.Please give some sample code about it.
Thanks
Sibi V J
推荐答案
或者您可以为此创建注册表项
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run
类型REG_SZ
名称:您的应用名称
数据:应用程序的路径
Or you can create a registry entry for this
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Type REG_SZ
Name: your app name
Data: Path to your application
您只需通过代码将应用程序复制到Windows Startup文件夹即可.
You just copy your application to Windows Startup folder through code.
有很多地方可以注册该文件-启动文件夹是最简单但最差的(最不通用).
首先,考虑创建并安装Windows Service.我知道这可能是一个很大的矫kill过正.
对于常规应用程序,我可以提供最终建议:转到 Sysinternals Suite :
http://technet.microsoft.com/en-us/sysinternals/bb842062 [ ^ ].
下载全部-许多非常好实用程序,但是您需要运行自动运行.查看它的工作原理并阅读帮助:它将为您提供所有位置的最终描述(实际上,所有位置在注册表中),这些位置用于注册您的应用程序以自动启动.
可以了!
就是这样.
There are several placed to register this thing -- Startup Folder is the easiest but the worst (least universal).
First, consider to create and install Windows Service. This can be a big overkill, I know.
For regular applications, I can offer an ultimate advice: go to Sysinternals Suite:
http://technet.microsoft.com/en-us/sysinternals/bb842062[^].
Download all -- many very good utilities, but you will need to run Autoruns. Look how it works and read the help: it will give you the ultimate description of all locations (practically, all in registry) where to register your application to start automatically.
It works!
That''s it.
这篇关于Windows启动时启动应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文