Announcement

Collapse
No announcement yet.

Task Scheduler suddenly will not run exe's in a script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Task Scheduler suddenly will not run exe's in a script

    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:
    Code:
    Echo OFF
    notepad.exe
    EXIT
    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.

    Any thoughts?


  • #2
    Any recent patches applied?
    (that is normally the reason for sudden changes of this sort)

    If so, try rolling them back one by one
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Besides Ossian's reply - were there any GPO changes? Any new restrictions? Any change in UAC level? What user account are you using to schedule the task?
      Cheers,

      Daniel Petri
      Microsoft Most Valuable Professional - Active Directory Directory Services
      MCSA/E, MCTS, MCITP, MCT

      Comment


      • #4
        I can confirm that there have been no patches applied, UAC changes, and no GPO changes. These particular servers are in a managed group and get no updates deployed without being selected by me. Having said that, our InfoSec group is notorious for operating like the KGB and on more than one occasion have been caught "messing around" without submitting proper change requests.

        As for user accounts, I'm using a logon-able service account with local admin rights. I've also tried using a standard service account with the same local admin access as well as just local system account. No account can even open notepad via task scheduler.

        Comment

        Working...
        X