BartoszCichecki / LenovoLegionToolkit

Lightweight Lenovo Vantage and Hotkeys replacement for Lenovo Legion laptops.
GNU General Public License v3.0
4.64k stars 221 forks source link

[BUG]: Actions can not run correctly when the program autorun on startup #714

Closed Eric-lHHI closed 1 year ago

Eric-lHHI commented 1 year ago

Version

2.12.0

OS

Windows 10 21H2 19044.2965

Device

Yoga 14sACH 2021 D

BIOS version

HECN24WW

What's wrong?

My automatic actions and quick actions is set to run some bat files. But after I set the the program to autorun on startup, whether it is a delayed autorun or not, when I restart the computer, the software cannot run my bat files correctly, and click the "run now" button will also not work. image image other action is ok image

After I restart the software again, it can run correctly. image image

The bat files are to change the windows power plan,like

Performance.bat

powercfg -s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

I am not sure if it's a common problem or it just doesn't fit my laptop since I'm using a Yoga instead of Legion laptop.

How to reproduce the bug?

  1. set the program to run on startup
  2. restart the computer
  3. run the quick action to run a script
  4. restart the program
  5. run the quick action to run a script

What is the behavior that you expected?

I think it should work correctly no matter the program start on windows startup or start by me.

Logs

The problem just happened when it starts with windows startup and I am sorry that I don't know how to make it auto run in log mode.

Do you have Lenovo software installed?

Did you disable any Lenovo software using Lenovo Legion Toolkit?

Additional information

No response

BartoszCichecki commented 1 year ago

The first thing I would try is that I would put absolute path to the script instead of relative.

I tried similar script to yours and it runs without any issues.

Eric-lHHI commented 1 year ago

Thanks a lot. It works well after I use absolute path.