0
votes
Set WshShell = WScript.CreateObject( "WScript.Shell" )
Dim strCurDir

strCurDir = WshShell.CurrentDirectory

WshShell.Run  strCurDir & "\Advertise.bat", 0, True
Wscript.Sleep(2)

WshShell.Run strCurDir &  "\Uninstall.bat", 0, True
Wscript.Sleep(2)

WshShell.Run strCurDir "\Install.bat", 0, True


Set WshShell = Nothing
Wscript.quit

I'm trying to execute this script in command line. I'm getting

Error 800A0401-Expected end of statement. Source: Microsoft VBScript Compilation error.

1

1 Answers

3
votes
WshShell.Run strCurDir "\Install.bat", 0, True

==>

WshShell.Run strCurDir & "\Install.bat", 0, True

Next time publish the error line number.