BartoszCichecki / LenovoLegionToolkit

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

[BUG]: Unable to launch application from SYSTEM account #574

Closed teconmoon closed 1 year ago

teconmoon commented 1 year ago

Version

2.9.1

OS

Windows 11 22H2 build 22621.1265

Device

Legion Y540-15IRH

BIOS version

BHCN45WW

What's wrong?

I use my laptop primarily with an unelevated user account and then elevate when necessary. Since the Lenovo Legion Toolkit requires administrator permission to run, I've been attempting to run the application as a service (For example, using NSSM) so that I can configure actions to run in the background regardless of who's logged into the laptop.

I tried launching the application using the SYSTEM account via PsExec so that I could configure it, and instead of the program launching, I received the pictured error:

image

How to reproduce the bug?

Download PSTools and open CMD as an admin. Launch Lenovo Legion Toolkit as SYSTEM using the following command:

PsExec.exe -accepteula -s -i "Lenovo Legion Toolkit.exe"

What is the behavior that you expected?

For the application to open

Logs

Not applicable as the application doesn't successfully open like this

Do you have Lenovo software installed?

Did you disable any Lenovo software using Lenovo Legion Toolkit?

Additional information

My laptop was a fresh Windows install with no pre-installed Lenovo software.

BartoszCichecki commented 1 year ago

"Other remarks

LLT currently does not support installation for multiple users, so if you need to have multiple users on you laptop you might encounter issues. Same goes for accounts without Administrator rights - LLT needs an account with Administrator rights. If you install LLT on an account without such rights, LLT will not work properly."

Duplicate of #246

mind12 commented 1 year ago

@teconmoon Just a quick idea I was working on but not finished yet. If you enable auto start for LLT there is a scheduled task you can edit. It runs on user logon, so if you put a script that checks if LLT is already running and you kill it and start it again for the current user it should work with multiple accounts.