I have a script (bat file) that has been running successfully for months until recently. Suddenly, this script works save the part that calls an exe. The bat file will run fine manually but fails at the exe call when run through Task Scheduler. To dumb it down a bit and prove my hypothesis, I wrote the following bat file:
When run manually, it launches notepad and persists until notepad is closed. When I run it via Task Scheduler, it does nothing. It wont even exit its RUNNING state. I've tried this in Win7, Win8, and Server 2008 R2 and it runs fine both ways. Its only on my 2012 R2 servers where this is a problem. Something has changed and I can't figure out what it is.
Echo OFF notepad.exe EXIT