使用 Windows API 获取所有 Windows 启动进程的最佳方法是什么? [英] What is the best way to get all Windows startup processes using Windows API?

查看:29
本文介绍了使用 Windows API 获取所有 Windows 启动进程的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我需要查看启动文件夹和某些注册表项.但是如何使用 Windows API 做到这一点呢?我有兴趣了解 Windows XP 和 Vista.感谢您抽出宝贵时间.

I know there are startup folders and certain registry keys I need to look into. But how to do that using Windows API? I'm interested to know for Windows XP and Vista. Thanks for your time.

推荐答案

没有单一的 API 可以获取所有在系统启动时运行的程序.考虑 Autoruns 显示的所有内容.对该程序的更新偶尔会允许它显示新的程序类别,并且由于这些更新是对程序而不是操作系统的更新,因此显然不是某些 API 正在更改以包含更多内容.相反,是该程序逐渐扩展其自动运行程序"的概念.

There is no single API to get all the programs that run while the system is starting up. 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. Rather, it's the program that's gradually expanding its notion of what an "auto-run program" is.

确定希望将什么视为启动流程",然后您可以确定可以结合哪些 API 或其他技术来找出所有这些流程是什么.

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.

要查看的地方包括以下内容:

Among the places to look include the following:

  • The "run" registry key, like AJ mentioned.
  • The "startup" menu, as given by various constants used with ShGetFolderPath and some of its related functions.
  • Tasks scheduled to run on login.
  • Services.

每个要点至少包含一个指向 MSDN 页面的链接,可以帮助您入门.如果您需要更多,请考虑提出一些更具体的问题.

Each bullet point includes at least one link to a page on MSDN that should get you started. If you need more, consider asking some more specific questions.

这篇关于使用 Windows API 获取所有 Windows 启动进程的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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