When you enter batchfile.bat at the command line, you tell cmd.exe to read the file and execute each batchfile.bat line in it. When you double-click on a batch file in Explorer, it calls cmd.exe after reading the file associations in the registry.
Task Manager is not so kind.
So, for your task to work, schedule it as follows (from memory, not from the Windows box):
cmd /c "c:\full\path\to\your\batchfile.bat"
For added reliability, you can make sure that the batch file is launched from a known directory, for example, in the one in which it is located by adding it at the top:
pushd %~dp0 REM .... The original batch file goes here .... popd
And finally, you can disable CMD autorun recording by adding /d immediately after cmd as follows:
cmd /d /c "c:\full\path\to\your\batchfile.bat"
source share