Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Scripting
Windows Script Host
 Quit Method (Windows Script Host)

  Switch on low bandwidth view
This page is specific to
.NET Framework 3.0

Other versions are also available for the following:
Windows Script Host
Quit Method (Windows Script Host)

Forces script execution to stop at any time.

object.Quit([intErrorCode])
object

WScript object.

intErrorCode

Optional. Integer value returned as the process's exit code. If you do not include the intErrorCode parameter, no value is returned.

The Quit method can return an optional error code. If the Quit method is the final instruction in your script (and you have no need to return a non-zero value), you can leave it out, and your script will end normally.

Description

The following JScript code snippet quits execution and returns an error code of 1:

WScript.Quit (1);

// This line of code is never executed.
var i = 0;

Applies To:

Reference

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker