简体   繁体   English

使用Windows API获得所有Windows启动过程的最佳方法是什么?

[英]What is the best way to get all Windows startup processes using Windows API?

I know there are startup folders and certain registry keys I need to look into. 我知道有一些启动文件夹和某些注册表项需要调查。 But how to do that using Windows API? 但是如何使用Windows API做到这一点? I'm interested to know for Windows XP and Vista. 我对Windows XP和Vista感兴趣。 Thanks for your time. 谢谢你的时间。

There is no single API to get all the programs that run while the system is starting up. 没有一个API可以让系统启动时运行所有程序。 Consider all the things that Autoruns shows. 考虑所有的事情, 自动运行显示。 Updates to that program occasionally allow it to show new classes of programs, and since those are updates to the program and not to the OS, it's obviously not some API that's changing to include more things. 对该程序的更新有时会使其显示新的程序类,并且由于这些是对该程序的更新而不是对OS的更新,因此显然不是某些API会更改以包含更多内容。 Rather, it's the program that's gradually expanding its notion of what an "auto-run program" is. 而是,该程序正在逐步扩展其对“自动运行程序”的概念。

Work out what you wish to consider to be a "startup process," and then you can determine what APIs or other techniques you can combine to find out what all those processes are. 确定希望视为“启动过程”的部分,然后可以确定可以结合使用哪些API或其他技术以找出所有这些过程。

Among the places to look include the following: 值得一看的地方包括:

Each bullet point includes at least one link to a page on MSDN that should get you started. 每个项目要点都包含至少一个指向MSDN上的页面的链接,该链接应助您入门。 If you need more, consider asking some more specific questions. 如果您需要更多,请考虑问一些更具体的问题。

I am not sure such an API exists. 我不确定是否存在这样的API。 Nevertheless you can write a function to do that. 不过,您可以编写一个函数来做到这一点。

The startup process names and location are stored in following location in registry: 启动过程名称和位置存储在注册表中的以下位置:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
<Name> <Location of EXE>

You can write small function to open the above registry and read the startup process details. 您可以编写小的函数来打开上面的注册表并阅读启动过程的详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Windows中获取安装前缀的最佳方法是什么 - What is the Best Way to get Installation Prefix in Windows 获取所有进程的列表 windows 名称 - Get list of all processes windows name 使用Windows API获得键盘输入的更好方法? - A better way to get keyboard input using Windows API? 获取Windows启动程序信息 - get windows startup program info 如何获取所有正在运行的进程的全名,包括 Windows 上的内核进程 - How To get the full name of all processes running including kernel processes on windows 有没有办法,或者让“所有”窗口在当前进程下运行的“公认”方法是什么? - Is there a way, or what is the 'accepted' way to get all the windows running under the current process? 使用 Windows API 显示分层数据的最佳方式(如注册表编辑器) - Best way to display hierarchal data using Windows API (like that of the Registry Editor) 在Visual Studio中使用C ++创建Windows窗体应用程序时的最佳线程化方法是什么? - What is the best way of threading while using c++ to create windows form application in visual studio? 分布式进程异步通信的最佳方式是什么? - What is the best way for distributed processes to communicate asynchronously? 在Windows中将参数传递给线程的最佳方法是什么? - what is the best way to pass arguments to thread in C windows?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM