获取Windows启动程序信息

get windows startup program info

本文关键字:信息 程序 启动 Windows 获取      更新时间:2023-10-16

我喜欢以编程方式获得Windows启动程序信息,例如启动msconfig.exe时显示的信息。如果我能找到msconfig.exe的源代码,那就太好了。但我还没找到。我知道我可以看看注册表,HKLMSoftwareMicrosoftWindowsCurrentVersionRun和HKCUSoftwareMicrosoftWindowsCurrentVersionRun。但问题是msconfig.exe显示禁用的启动程序及其禁用时间,但注册表没有显示禁用的启动程序。什么好主意吗?

对于禁用的启动项,请查找注册表项:

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

"SOFTWAREMicrosoftShared ToolsMSConfigstartupfolder"
"SOFTWAREMicrosoftShared ToolsMSConfigstartupreg"

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

// 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";