How to distinguish autostart of a program from opening it directly?

Question:

My task is to launch the desktop cleaning program along with windows, but the interface (program settings) should only be launched when the program is opened directly (for example, through a shortcut).

I made a similar program device:
![I made a similar program device:

But it has two entry points, so you have to create two separate exe, launcher and the script itself, but this solution seems crooked to me.

Is there a solution with one exe?

Asked By: Mop

||

Answers:

You can add command line parameter like --disable-ui (with corresponding processing in the application) and add it to the startup with this parameter. For example for Windows you can create a shortcut with target set to "path_to_exe" --disable-ui and add it to the startup folder (see this)

Answered By: Guru Stron
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.