You can't just assume that everything is in C:\Documents and Settings\ - it may not be true for all users and certainly not under international versions of Windows. You can find however the information from the registry.
For the current user, the directories for the Start Menu, Programs, and Startup are stored in:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
as the values "Start Menu", "Programs" and "Startup", respectively.
The "AllUsers" start menu paths can be found in:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
(Note the change of root key!), under "Common Start Menu", "Common Programs" and "Common Startup"
As to searching; if you have a known list of possibilities then an simple
Code:
if ( FileExists(I am a spammer) )
{
// ... something
}
else if ( FileExists(yyy) )
{
// ... something else
}
else....
would suffice.
Otherwise you are really getting into the realm of an external program to find the files for you. You could use the IShellLink COM interface to parse the links (the Microsoft approved way of working with shortcuts), or you could do it "manually" with FindFirstFile(), FindNextFile() API calls. The prgram could write the result to a known registry key and Opus could then read that.