(58, 2) WshShell.Exec: The system cannot find the file specified.
Hi there. This script has never failed to run before - although it is only run about once a year. The error is the subject above.
Here is the offending VBS script:
function execQuery(sSQL, sFileName, sStatusText)
dim cmdline, oExec, iTime
bStillRunning = false
cmdline = "osql -E -S" & sServer & " -d" & sDatabase & " -w1000 -Q " & chr(34) & sSQL & chr(34) & " -o" & chr(34) & sOutputLocation & "\" & sFileName & chr(34)
set oExec = WshShell.Exec(cmdline)
wscript.echo sStatusText & " [pid: " & oExec.ProcessId & "] "
Do While oExec.Status = 0
iTime = iTime + 1
'if iTime > 100 then
'wscript.echo vbtab & "...continuing asynchronously with other scripts. "
'WScript.Echo vbtab & sFileName & " will be available when processid " & oExec.ProcessId & " terminates"
'bStillRunning = true
if bStillRunning = false then
WScript.Echo "........COMPLETED [" & sOutputLocation & "\" & sFileName &"]"
I am not a script writer or programmer ...please help! This vbs script is being called by a batch file. The bold above is line 58
Re: (58, 2) WshShell.Exec: The system cannot find the file specified.
Hi @KenReilly , could you help us understand, which SmartBear tool does this question relate to?
Are you asking about TestComplete?
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️