获取Windows启动程序信息

时间:2016-09-16 21:55:46

标签: c++ windows registry startup

我喜欢以编程方式获取Windows启动程序信息,例如启动msconfig.exe时显示的信息。如果我能找到msconfig.exe的源代码,那就太好了。但我还没有找到它。我知道我可以查看注册表,HKLM \ Software \ Microsoft \ Windows \ CurrentVersion \ Run和HKCU \ Software \ Microsoft \ Windows \ CurrentVersion \ Run。 但问题是msconfig.exe显示已禁用的启动程序及其禁用时间,但注册表未显示已禁用的启动程序。有什么想法吗?

1 个答案:

答案 0 :(得分:2)

对于禁用的启动项,请在以下位置查找注册表项:

// MSConfig禁用启动的注册表路径

"SOFTWARE\Microsoft\Shared Tools\MSConfig\startupfolder"
"SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg"

与启动项相关的其他键(很久以前我的代码摘录:)

// registry paths for startups
const UnicodeString     STR_REG_RUN                 = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";
const UnicodeString     STR_REG_RUNONCE             = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce";

// registry paths for MSConfig disabled startups
const UnicodeString     STR_REG_MSCONFIG_STARTUPFOLDER = L"SOFTWARE\\Microsoft\\Shared Tools\\MSConfig\\startupfolder";
const UnicodeString     STR_REG_MSCONFIG_STARTUPREG    = L"SOFTWARE\\Microsoft\\Shared Tools\\MSConfig\\startupreg";

const UnicodeString     STR_REG_IE_BHO              = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects";
const UnicodeString     STR_REG_IE_SEARCH_HOOKS     = L"SOFTWARE\\Microsoft\\Internet Explorer\\URLSearchHooks";
const UnicodeString     STR_REG_IE_TOOLBAR          = L"SOFTWARE\\Microsoft\\Internet Explorer\\Toolbar";
const UnicodeString     STR_REG_IE_EXPLORER_BARS    = L"SOFTWARE\\Microsoft\\Internet Explorer\\Explorer Bars";
const UnicodeString     STR_REG_IE_EXTENSIONS       = L"SOFTWARE\\Microsoft\\Internet Explorer\\Extensions";
const UnicodeString     STR_REG_CLSID               = L"SOFTWARE\\Classes\\CLSID";