I'm not yet a programmer but looking for a solution that is not made yet seems fun. I do have some questions about the solution I look for.
Situation: I have a keyboard that needs an application to make customization possible. But this software makes the keyboard go crazy every time I logoff, lock, shutdown or reboot the PC. I did notice that when I force close the application, the keyboard's customization stays the way I configured it.
So, I made a small batchfile that force close this application:
taskkill /im Lcore.exe /f
Really small, I know, but it does what it has to do, force closing LogitechGamingSoftware.exe
Problem: This batchfile should run every time the application would be closed by Windows itself. Using the Task scheduler doesn't seem to work. And making it work trough gpedit.msc also fails.
Question: What do I do wrong to get this small file to to what I want it to do at the right moment?
In task scheduler I tried it this way:
- Make a new task
- Name it, execute only if user is logged on, with elevated privileges
- Trigger: @ locking of the workstation, any user
- Action: execute application,
c:\Scripts\Batch\ForceCloseLGS.bat
- Conditions: stock settings
- settings: Task might be executed on request, task execute as fast as possible
Save and test.
Doesn't do anything at all. If pressed Win+L keys, keyboard goes haywire. But if I execute the batch from the task scheduler menu, it works.
Where am I going wrong?
Thanks