I had this issue as well. 0x2 from task scheduler seemed to say it couldn't find the batch file. This was false - I added some pipe arrows (>>) to output my batch file to a logfile, then ran the scheduled task.
Despite getting a 0x2 in Task Scheduler, I found the batch file had actually run, but had encountered an error (which showed up in the logfile).
Another thing to try is running the task as SYSTEM or NETWORK SERVICE instead.