General discussion
August 1, 2002 at 08:13 AM
faisalmasood

Scheduled Batch file not running!!!

by faisalmasood . Updated 23 years, 11 months ago

Scheduled Batch file not running!!!
PC:
W2k SP2 with Terminal Service & MS ISA Server Installed.

Situation:
I’ve configured a batch file to backup the site daily. Every thing was running perfectly until I run the TSDEPLOY.EXE archive

file from the Server Utilities of Microsoft TechNet June 2000 Volume 8, Issue 6 without first knowing its effects.

This archive didn’t ask for extraction, but ran the scripts in it.
1) ACLS.CMD –> This script will put more stringent security onSYSTEM DRIVE AND ALL FILES/DIRECTORIES ON SYSTEM DRIVE
2) HIDE.CMD –> This is used to hide the files on the system.
etc

After that almost every thing in Start > Program was unavailable etc.. … So I manually change the permissions on %systemroot%, System32,… etc folders after verifying permissions from another Server. Now evey thing is fine.

The only problem is that my scheduled batch file is diplaying error as soon as it is being started by the Task Scheduler:

………
‘date /t’ is not recognized as an internal or external command, operable program or batch file.
‘net’ is not recognized as an internal or external command,operable program or batch file.
…..

But when I try to run this batch file directly, then its running perfectly. I’m using Admin account. Batch script is:

@ echo off
cls

for /f “tokens=1-4 delims=/ ” %%i in (‘date /t’) do mkdir d:\Backups\%%j-%%k-%%l

for /f “tokens=1-4 delims=/ ” %%i in (‘date /t’) do cd d:\Backups\%%j-%%k-%%l

net use x: /delete
net use x: \\server\Site$
wzzip.exe -rp -whs -ex site.zip x:\site\
….
….

Tell me where is the problem & why the script is not running with Task Scheduler.

This discussion is locked

All Comments