Difference between WScript and CScript

Discussion in 'Javascript' started by capt edgar, Jan 7, 2010.

  1. capt edgar

    capt edgar Guest

    Hi there

    what is the difference between WScript and a CScript language.
    Where can u find good tutorial for CScript on the internet.

    I have tried googling it and it comes back saying Javascript arent
    Javascript something for web development. i'm after window scripting

    newbie here. please advice

    regards
     
    capt edgar, Jan 7, 2010
    #1
    1. Advertising

  2. capt edgar wrote:

    > what is the difference between WScript and a CScript language.


    Is there anything like a "WScript language" or a "CScript language"? I
    don't think so.

    Windows Script Host has two command line apps, one called "wscript", one
    called "cscript". Both allow you to run programs in JScript or VBScript
    or other active scripting language implementations, the only difference
    being that stuff like
    WScript.Echo("foo");
    when executed with "wscript" (e.g. wscript file.js) displays a dialog
    window whilst the same execution with "cscript" (cscript file.js) writes
    to the console window you are running the command in.

    See http://msdn.microsoft.com/en-us/library/xazzc41b(VS.85).aspx, which
    says:
    "The WScript command opens separate windows for output, whereas the
    CScript command sends output to the Command Prompt window from which it
    was initiated."


    --

    Martin Honnen
    http://msmvps.com/blogs/martin_honnen/
     
    Martin Honnen, Jan 7, 2010
    #2
    1. Advertising

  3. capt edgar wrote:
    ^^^^^^^^^^
    Who?

    > what is the difference between WScript and a CScript language.


    Those are _not_ different programming languages, see below.

    > Where can u find good tutorial for CScript on the internet.


    You could start with checking the vendor's Web site,
    <http://www.microsoft.com/>.

    > I have tried googling it and it comes back saying Javascript arent
    > Javascript something for web development.


    You are not making sense. When I search with Google for "wscript cscript",
    the first result is
    <http://msdn.microsoft.com/en-us/library/xazzc41b%28VS.85%29.aspx>
    which says what both are and what is the difference between them:

    | Running Scripts from Windows or a Command Prompt
    |
    | Windows Script Host enables you to run scripts from Windows or at a
    | command prompt.
    |
    | Script Hosts
    |
    | The WScript command opens separate windows for output, whereas the
    | CScript command sends output to the Command Prompt window from which
    | it was initiated.

    > i'm after window scripting


    Did you mean _Windows_?

    > newbie here. please advice


    Please read <http://jibbering.com/faq/#posting> pp., including
    <http://www.catb.org/~esr/faqs/smart-questions.html>.


    PointedEars
    --
    Anyone who slaps a 'this page is best viewed with Browser X' label on
    a Web page appears to be yearning for the bad old days, before the Web,
    when you had very little chance of reading a document written on another
    computer, another word processor, or another network. -- Tim Berners-Lee
     
    Thomas 'PointedEars' Lahn, Jan 7, 2010
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert W. Eckert
    Replies:
    4
    Views:
    788
    =?Utf-8?B?Um9iIEVja2VydA==?=
    Oct 5, 2004
  2. jakk
    Replies:
    4
    Views:
    12,435
  3. Rich
    Replies:
    3
    Views:
    1,557
  4. Replies:
    3
    Views:
    614
    Gabriel Genellina
    Mar 3, 2009
  5. Sandeeo

    Javascript and CScript

    Sandeeo, Oct 7, 2005, in forum: Javascript
    Replies:
    1
    Views:
    127
    Martin Honnen
    Oct 7, 2005
Loading...

Share This Page