I'm curious if there's a way to know from within my process if it was started from a Windows autorun key?
This one: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
EDIT: After posting this question, I discovered that evidently there's a way to find out. Process Explorer knows it somehow:
Or does it simply scan the registry, looking for a match?
Typically you would do this by arranging that the command line for your autorun registry key passed a special argument to indicate that you were starting from autorun. That's your only viable option.