I'm trying to write a vbscript that will run two other vbscripts. Here's my current code:
Dim objShell, oFSO
Set objShell = Wscript.CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
' Determine script location for VBScript
sScriptDir = oFSO.GetParentFolderName(WScript.ScriptFullName)
' Run scripts
objShell.Run oFSO.BuildPath(sScriptDir, "code\saveExcel.vbs") , 0, true
objShell.Run oFSO.BuildPath(sScriptDir, "code\launchScript.vbs") , 0, true
' close shell
Set objShell = Nothing
The folder is structured as follows:
When I run my script I get this error message:
I have written dozens of scripts that run other scripts in the same format as the above script, but this is the only one that doesn't work and I have no clue why.