System state script not run through task scheduler?


  • Hi all,

    I created one batch file for take domain controller system state backup. when i run the batch file manually, the backup will run. systemstate backup not running when i put that script in task scheduler. please suggest me what i need to do? thanks in advance. my script as follows,

    @echo on
    For /F "tokens=2-4 delims=/ " %%A in ('Date /t') do (
    Set DATE1=%%A
    Set DATE2=%%B
    Set DATE3=%%C
    set HH=%TIME:~0,2%
    set MM=%TIME:~3,2%
    set SS=%TIME:~6,2%
    set vsite=%date3%-%date2%-%date1%_%hh%-%mm%-%ss%
    mkdir \\\Corpsvrbackup\PDC-2.26\SystemStateBackup\%vsite%
    set vbremote=\\\Corpsvrbackup\PDC-2.26\SystemStateBackup\%vsite%
    wbadmin start systemstatebackup -backuptarget:%vbremote% -quiet

    Dhakshinamoorthy Balasubramanian

    12 มีนาคม 2555 5:43