I have a batch file that run perfectly when you right-click it and run it as Administrator in Windows 10 however when I test the batch file and run it on demand from task scheduler it does not run. Essentially the batch file kills a couple of processes and launches MS Edge in kiosk mode to a python script which displays a timetable.
It does appear to run the taskKill commands as I can see MSedge and the script terminate but it never launches MS Edge.
c:
cd "C:\Program Files (x86)\Microsoft\Edge\Application"
taskkill /f /im msedge.exe /T
taskkill /f /im python.exe /T
start msedge.exe --kiosk --no-first-run --remote-debugging-port=9111 --user-data-dir="C:\TEMP_DATA"
cd "C:\Program Files\Python311"
python.exe c:\data\show_timetable4.py
General Tab:
Troubleshooting:
I have enabled run with the highest privileges in Task Scheduler.
Given full access privileges to all the process directory paths in the script.
The account that runs the task has full admin rights and the PC does not belong to a domain.
I have included a couple of images with tabs from task scheduler.

