Windows 10 - Can you run and close a program automatically at startup?

1Wolf

Limp Gawd
Joined
Jul 10, 2007
Messages
414
Windows 10 question....

I have a little problem with a piece of software I was hoping someone might have a slick solution for.

My system has a few sets of the Lian Li SL120 UniFans. The "default" for the fans is just an RGB rainbow. There is a configuration program for them called "L-Connect" where you can set the RGB colors, effects, etc. You can open L-Connect, set your effects/colors, then close the program completely and the fans will maintain those effects/colors you set. When you click "X" on the program it closes to the system tray. Then you can right click in the system tray and choose "Exit". However, if you shut down and power off completely (Remove power from the system) then when you boot back up the fans will default back to the default "Rainbow" RGB. In order to restore them to what you had set up, once in windows you need to open the L-Connect software again...and then just close it. Then you can either leave it running in the system tray or right click and select "Exit".

The L-Connect software...is...well....bad. Its the only software I've ever seen like this with absolutely no "settings" panel, no checkbox to be able to run it at startup, and no checkbox to be able to run it in the system tray.

If I use "shell:startup" from the command line and add the shortcut for L-Connect to the startup folder....that does work. However, once windows comes up and L-Connect runs....of course it still has its window open and sitting there at the desktop so I have to go and manually click "X" on the program to "close" it to the system tray. It works, its just stupid and cumbersome.

Is there a better way to do this? Is there a way to have windows run it at startup, and then close it? Or is the only option waiting for Lian Li to create an update for their software that provides a "minimize to system tray" checkbox and a "run at startup" checkbox.
 
Last edited:
Joined
Apr 29, 2002
Messages
2,507
Write a start, pause, taskkill script and put that in your startup routine?

Something like:
Start c:\lianli\programname
timeout /t 10 /nobreak
taskkill /im "programname" /f
 
  • Like
Reactions: 1Wolf
like this

slavie

Weaksauce
Joined
Jan 2, 2012
Messages
118
Yep, small .bat script. Then in add your newly created shell script to the start menu startup folder and disable the lianli utility from auto start. Might have to fiddle around with it a bit, but that should do it.
 
  • Like
Reactions: 1Wolf
like this

dbwillis

Supreme [H]ardness
Joined
Jul 9, 2002
Messages
8,023
turn it into a service, isnt there a PS something to install an app as a service?
 
  • Like
Reactions: 1Wolf
like this

pendragon1

Fully [H]
Joined
Oct 7, 2000
Messages
27,370
one of those^^^ or you could try to set it to run minimized and just plop it in your startup items
1617044980909.png
 
  • Like
Reactions: 1Wolf
like this

1Wolf

Limp Gawd
Joined
Jul 10, 2007
Messages
414
Thanks for the help.

Let me clarify a bit. When you open the L-Connect application and then click the "X" in the upper right corner the application will "close" to the windows notification area. Its one of those applications that is coded so that when the user clicks "X" it goes to the system tray instead of either shutting down completely or minimizing. There is no settings or options for the program.

If I go to shell:startup and add a shortcut to the program there, then L-Connect will run just fine when windows starts. The problem is that it leaves the window open.

What I want to do is this...

Have the program run at startup JUST as it is now using shell:startup...only I'm trying to automate clicking on the "X" to close the program to the notification area. That way the window doesn't sit there open in the middle of the screen until the user closes it and they can open the notification area to find the little icon there and close it there if they wish.

Write a start, pause, taskkill script and put that in your startup routine?

Something like:
Start c:\lianli\programname
timeout /t 10 /nobreak
taskkill /im "programname" /f

Thank you! That works well. This is my second option as it will kill the process completely. My issue isn't really that the program is running but that its in this window that has popped up in the middle of the screen on startup. I was hoping I could automate a click on the "X" to send the program to the notification area. That way I don't need to worry about "timing" or whether the program was open long enough to actually configure the fan profiles. I just don't want this window popping up in the middle of the screen that the user then has to click the "X". It just seems there should be some way of automating the click of the "X".

Maybe instead of "taskkill" is there something like "windowClose" or something like that which would just close the window but not kill the process?

turn it into a service, isnt there a PS something to install an app as a service?

Hate to say it, but I have no idea what that means. I've never installed an app as a service and am not sure if that would solve my issue or not.

one of those^^^ or you could try to set it to run minimized and just plop it in your startup items
View attachment 343318

Thans pendragon1. I did try that. It ran L-Connect at startup but then just minimized it to the taskbar. Instead of minimizing to the taskbar I'd much prefer clicking the "X" so that it goes to the notification area.
 
Top