I am getting the 800A0414 error in lines 7 and 12 of this script:
Module Module1
Dim p
Sub Main()
CreateObject(\"Wscript.Shell\").Run(\"progr
Seems to me this is a VB.NET, not VBScript code. You have Shell function in VB.NET (and other methods).
Anyway, Run returns any error code returned by the program, and if you store that result in a variable, you can use parentheses in this case.
Dim lResult As Long
lResult = CreateObject("Wscript.Shell").Run("program.bat", 0, True)
The rest was answered by @Helen.