Run Vbs File From Cmdp

You can run script files from the command line in one of two ways: Type the name of the script, including its file name extension, at the command prompt: HardwareAudit.vbs. Type the name of one of the script hosts followed by the name of the script: cscript HardwareAudit.vbs. A VBS script is a file that contains VBScript or Visual Basic Scripting codes. 6 3 Keygen Qnx Commands more. How Execute VBS Script. How to Run PowerShell Scripts From the Command Line.

I have the following vbs script from for adding Excel add-in: Dim oXL As Object Dim oAddin As Object Set oXL = CreateObject('Excel.Application') oXL.Workbooks.Add Set oAddin = oXL.AddIns.Add('c: Program Files MyApp MyAddin.xla', True) oAddin.Installed = True oXL.Quit Set oXL = Nothing I save the above script to a file called as addin.vbs and run it from a command console: C.>cscript addin.vbs I got the following error: c. Addin.vbs(1, 9) Microsoft VBScript compilation error: Expected end of statement Not sure how I can run it from cmd console? I am running it from Windows XP.