Marcel
Marcel

Reputation: 233

Detect if Application start using a manual handling (Pressing an Icon) or start when windows start

I have made my application to start automaticly when windows start (registry ../currentversion/run/appname + path). In this mode the application start minimized and an little icon appear in the notification icon area. With this icon you can maximize the app or exit it.

If you exit the app and start it again using the Menu (Start/programs etc) than the application start in minimized mode (and in this case I would like to have it in normal mode) because the setting autostart is still true.

Is there a way you can detect when the application start when windows startup using the above registry or when people click on an icon in the programs menu (or desktop)?

Do I make myself clear?

Upvotes: 0

Views: 384

Answers (2)

Jon Egerton
Jon Egerton

Reputation: 41579

How about setting the registry key to call your application with an /AUTOSTART commandline parameter. Then you can test for this and know that you've got the registry start, not the manual start.

Upvotes: 1

Benjamin Podszun
Benjamin Podszun

Reputation: 9837

I might miss the obvious, but - why is the registry shortcut not something like

yourApp.exe -startHidden

While the normal shortcuts start it visible?

Upvotes: 6

Related Questions