I like to get Windows startup programs info programmatically, such as the info shown when launch msconfig.exe. It would be nice if I can find msconfig.exe's source code. But I didn't find it yet. I know I can look at registry, HKLM\Software\Microsoft\Windows\CurrentVersion\Run and HKCU\Software\Microsoft\Windows\CurrentVersion\Run. But the problem is that the msconfig.exe shows the disabled startup program and its disabled time, but the registry didn't show the disabled ones. Any ideas?
1 Answers
2
votes
For disabled start-up items, look for registry keys at:
// registry paths for MSConfig disabled startups
"SOFTWARE\Microsoft\Shared Tools\MSConfig\startupfolder"
"SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg"
Other keys related to start-up items (excerpt from my code written long ago :)
// 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";