There is no simple solution to get the list of startup programs because there are multiple locations where startup programs are defined.
But you can retrieve a list using WMI or PowerShell. So the simplest solution would be executing those as command line processes, redirecting the output to a text file, and read and parse that file. See
Generate a List of Startup Programs via Command Line or PowerShell[
^] for using WMI and the PowerShell.
To execute processes use
system, _wsystem[
^] or
CreateProcess function (Windows)[
^]. The output should be written to a temporary file (see
GetTempFileName function (Windows)[
^]) which should be deleted after reading it. Reading a text file should be no problem. When using WMI you have to process the text file line by line and split the lines into it's column (use
strtok
,
CString::Tokenize
, or
AfxExtractSubString
). With the PowerShell output, items are separated by empty lines and the columns are prefixed with an identifier (when using the command from the above link).