I need to use task scheduler in 2008 server to run a vbscript that will do some check and run a cmd file if the check are true but for some reason the script doesnt run the cmd file.
here is the script.
Dim fso, oShell, objFiles
Set fso = CreateObject("Scripting.FileSystemObject")
Set oShell = WScript.CreateObject("WScript.Shell")
Set objFiles = fso.getfolder("S:\bkp_file").Files
If objFiles.count <> 0 Then
Set fso = Nothing
Set oShell = Nothing
Set objFiles = nothing
now if i run the script manaully by click it then the cmd file runs. any help would be appreciated.