0

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?

Mop
  • 53
  • 5

1 Answers1

1

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)

Guru Stron
  • 102,774
  • 10
  • 95
  • 132
  • 1
    Creating a shortcut with arguments: https://stackoverflow.com/questions/397125/reading-the-target-of-a-lnk-file-in-python/571573 Interception of arguments (from the command line or from a shortcut): https://stackoverflow.com/questions/4188467/how-to-check-if-an-argument-from-commandline-has-been-set/4188500 – Mop Jan 01 '23 at 11:10