I am running a .bat file for my script (Scheduled Tak (CronJob)) per minute. When it runs, windows command prompt appears for a fiction of time.
My batch code like
This VBScript creates a copy of your batch file in %Temp%, executes it silently and deletes it afterwards
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim tempfolder
Const TemporaryFolder = 2
Dim WshShell, strCurDir
Set WshShell = CreateObject("WScript.Shell")
strCurDir = WshShell.CurrentDirectory
batch = "@ECHO OFF" & vbCrLf & _
"C:\wamp\bin\php\php5.4.3\php.exe -f C:\wamp\www\tst\index.php"
Set tempfolder = fso.GetSpecialFolder(TemporaryFolder)
WshShell.CurrentDirectory = tempfolder
i=1
n=0
While n <> 1
If (fso.FileExists(i&".bat")) Then
i = i + 1
Else
n = 1
End If
Wend
Set File = fso.CreateTextFile(i&".bat",True)
File.Write batch
File.Close
Dim batchfile
batchfile = fso.GetAbsolutePathName(i&".bat")
WshShell.CurrentDirectory = strCurDir
WshShell.Run chr(34) & batchfile & Chr(34), 0, TRUE
fso.DeleteFile batchfile