CMD File Runs Fine By Itself But Not As Scheduled Task
Posted on 2016-08-15
I am having trouble getting a batch file (.cmd) to run as a Scheduled Task on Windows 2k12r2.
I can successfully run the file both in a command prompt & by double-clicking on it, no problem.
In setting up the Scheduled Task, I adjusted both the Domain and Local Group policies to Access the computer from the network, log on as batch job & allow logon locally. (e.g. Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment -> Log on as a batch job)
Furthermore, I logged into the machine as the User so that the User folder would get generated.
I've set it to run whether users is logged in or not. When I run the Scheduled Task manually I get Operational Code (2).
What am I missing here? Anything else for me to check?