Windows autostart of JUCE app

I want my JUCE standalone application to autostart in Windows 11 (whether user in logged on or not), which it dose. However, the program exits before it ever reaches my code. Windows Task History: return code 3221225477 → “Task Scheduler successfully finished”. Needless to say, the application runs perfectly when launched manually. Apparently, there is some dependency problem at startup. I’ve tried delaying and retrying but that didn’t seem to help. Any ideas?