First of all, #STARTF_TITLESHORTCUT (or $800) is un-documented, MSDN does not list it at all.
For such an important feature it's not wise to bet on it, it may only work on XP for example, you don't know.
Also, GetStartupInfo() only works on Win2K and later, in case you didn't know.
I understand what you mean now about the shortcut hotkey.
On Windows (at least XP and Vista I assume?) a shortcut has a extra shortcut tab that lets us set a hotkey.
Nope! there is no way to determine if the hotkey was pressed, as the hotkey combo is actually "simulating" clicking the shortcut.
And I'm confused what you are trying to do.
You want the program to go into automatic mode if the user uses the hotkey combo, I hope you make sure it can't be started multiple times.
If I where you I'd do it the other way around. Only allow automatic from a commandline or scheduler using parameters. While a normal shortcut and hotkey starts the full program, you avoid accidental cleanups that way.
The whole point of the shortcut is that clicking it (or using a hotkey) is just like clicking the program icon.
Also make sure that you do not force the user to use global hotkey (it may even clash with other programs).
If this is a program only for yourself on the other hand you can do whatever you want
EDIT: bad solution is to create two shortcuts in StartMenu with different switches, which will program check?
I really do not understand what you mean here.
A lot of programs do it this way.
Some games/programs have a normal shortcut and a Safe mode (where settings are changed back to default) or even a Debug mode.
They use flags like nothing or /normal or -safe or debug etc.
And I'm not sure by what you mean by "which" the program will check?
If you could explain a bit more, or if you what to explain in your own language then do so and if I'm unable to understand I'll just ask someone else here to translate for me. (I read "some" German).
I guess what I'm trying to say is, I'm confused as to what you are trying to do here.
