kulvind3r / GamingGaiden

Gameplay Time Tracker for PC and Emulator games
GNU Affero General Public License v3.0
90 stars 3 forks source link

Scheduled task for running the app at startup results in error #5

Closed balintlerch closed 7 months ago

balintlerch commented 7 months ago

Problem

The scheduled task on Windows startup results in the following error and does not start the application. Double clicking the shortcut still runs the app.

Error Image

image

kulvind3r commented 7 months ago

Not sure what is happening with your system. Scheduled Task does exactly the same thing that the shortcut does. No difference.

The above error is related to HWinfo sensors. Basically application is trying to set values of the sensor at startup.

One possibility that could be happening is that application is starting very quickly before Operating system even allows any app to access registry. So at startup registry access is still not ready and when app tries to write to registry it gets this failure.

and when later you run it from shortcut , registry is ready by then to be accessed by application and it works

You can try editing the scheduled task to start after a delay of 1 min and see if that fixes the error.

balintlerch commented 7 months ago

Unfortunately, adding a delay didn't work. I don't really know what causes the issue. If I find a solution, I'll update here.

kulvind3r commented 7 months ago

Few questions to debug...

  1. Do you have HWinfo installed? If you have the gaming gaiden sensors will appear in hwinfo and if they are appearing that means the path exist and the application is working as expecting.

  2. Can you check if the path does exist in the registry?

  3. Can you share the log file from the application folder? it is called GamingGaiden.log and is in the app directory., i will check what the logs say and if there is more info that can help.

balintlerch commented 7 months ago

So, I had a faulty HWinfo installation. After reinstalling it the error disappeared. However, the scheduled task still could not start. I still had the PowerShell popup on each Windows startup saying that Thread Job's state is Not Started (so basically the picture I attached without all the red stuff 😂).

I found a workaround, however. I just disabled the scheduled task and put the Gaming Gaiden shortcut in my PC's startup folder. Now the app is successfully launched with all my other startup applications. So, this issue is solved on my end.

Thank You for your quick support though.

kulvind3r commented 7 months ago

Closing the issue since the issue seems to be limited to user's machine and they have found a workaround for themselves.