I have a batch file called "ClockTalk.bat" that has 3 arguments:
nircmd.exe speak text "Attention it's now %1 %2, %3 Hours remain to the end of the day" -3
i use a vbscript called "HideBat.vbs" only to run the batch file with hidden dos screen:
'HideBat.vbs CreateObject("Wscript.Shell").Run "ClockTalk.bat" & WScript.Arguments(0) & WScript.Arguments(1) & WScript.Arguments(2), 0, False
and i run it from the command line like this:
HideBat.vbs 12 10 am
and it always give me an error: System cannot find the file specified
or if i run it like this:
HideBat.vbs "12 10 am"
it always give me an error: Subscript out of range
So what is wrong in my files, and how to run the batch file from the vbscript and pass the three arguments to it from the command line ?