Rem: Checking a WSH Script’s Syntax Without Running the Script

I have many long Windows Script Host (WSH) scripts in which I'd like to check the syntax without actually running the scripts. Are you aware of any tools designed for this purpose?

This answer is compliments of the Windows Script Host Development Team at Microsoft. You can easily perform a quick syntax check by inserting WScript.Quit at the top of your script. If a script includes the Option Explicit statement, put WScript.Quit after that statement. The script engine will perform a syntax check, then quit.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.