I have two vbs files/scripts that we keep separately and run separately. I'm writing a program that'll execute both scripts, but am having trouble. I get the error
(for line 5) that "The system cannot find the file specified." (code 80070002). I've checked the file path and it all looks good, I've even tried different locatiosn of the same file, but keep getting it. Is there something wrong in my script, or is it an error with my path name.
-
Option Explicit
-
-
Dim WshShell
-
Set WshShell = CreateObject("WScript.Shell")
-
WshShell.Run "C:\Moya\sfa transformation\codes\SFG Data Dic Latest\vbsFiles\Table.vbs", 7, True
-
wscript.echo "C:\Moya\sfa transformation\codes\SFG Data Dic Latest\vbsFiles\Table.vbs"
-
-
WshShell.Run "C:\Moya\sfa transformation\codes\SFG Data Dic Latest\vbsFiles\vbsTableColsNew.vbs", 7, True
-
wscript.echo "C:\Moya\sfa transformation\codes\SFG Data Dic Latest\vbsFiles\vbsTableColsNew.vbs"
-
I've also tried using ScriptStart, but I keep getting error on line 3 that "ScriptStart" is an undefined variable..
-
Option Explicit
-
-
ScriptStart("C:\Moya\sfa transformation\codes\SFG Data Dic Latest\vbsFiles\Table.vbs")
-
-
ScriptStart("C:\Moya\sfa transformation\codes\SFG Data Dic Latest\vbsFiles\vbsTableColsNew.vbs")
-
Help appreciated! I feel like I'm making silly mistakes, but if you can catch it, I'd be eternally grateful.