How to return or exit from a JScript (WSH)?

Discussion in 'Scripting' started by PNayak, Feb 16, 2007.

  1. PNayak

    PNayak Guest

    I've a simple quesion?

    How to exit from executing JScript ( I tried, Return, Exit and Quit- None
    works)
    Check the following script.

    TEST.js
    =====

    if (WScript.Arguments.Lengh=0)
    {
    WScript.Echo("Arguments missing!");

    ////---- I WANT TO QUIT here. What should I use?


    }

    WScript.Echo("Done");
     
    PNayak, Feb 16, 2007
    #1
    1. Advertisements

  2. WScript.Quit(666); //the devil made me do it ;-)...
    Download details: Windows Script Documentation
    http://www.microsoft.com/downloads/...48-207d-4be1-8a76-1c4099d7bbb9&DisplayLang=en
     
    Michael Harris \(MVP\), Feb 16, 2007
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.