Hello
Thank you for posting in Microsoft Community forum.
The return code 2147942655 indicates an "Access Denied" error. This typically means that the task did not have the necessary permissions to execute the action.
Here are a few steps you can take to troubleshoot and resolve this issue:
Check Permissions: Ensure that the user account running the task has the necessary permissions to execute the bot. You might want to try running the task with the highest privileges.
Run Manually: Try running the bot manually from the command line using the same user account to see if it executes without issues.
Task Configuration: Double-check the task settings in Task Scheduler:
Ensure "Run with highest privileges" is checked.
Verify that the correct user account is selected under the "General" tab.
Check the "Actions" tab to ensure the path to the executable is correct and accessible.
Event Viewer: Look for more detailed error messages in the Event Viewer under "Windows Logs" -> "Application" or "System" that might give more insight into why the task failed.
Dependencies: Ensure that any dependencies required by the bot (e.g., network access, other services) are available at the time the task runs.
Best Regards,
Wesley Li