Results 1 to 2 of 2

Thread: Difference between CScript and WScrip?

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    2

    Difference between CScript and WScrip?

    Is there a difference between CScript.exe and WScript.exe? From the text that I am reading, WSH and VBScript Programming, CScript.exe would be used if "... run your scripts in the background, or want to schedule your scripts to run....". It says to use WScript if I need to interact with the users. I am asking this question because, for teaching purposes, the examples provided use WScript.<whatever?> in the code.

    To use CScript.exe, could I apply all the objects and methods used for WScript.exe --- to CScript.exe? Are they basically the same?

  2. #2
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Difference between CScript and WScrip?

    No idea about Cscript, but VBScript and WScript are somewhat different ..
    from what i read "Cscript.exe is a command-line version of the Windows Script Host". "CScript runs entirely in the command line and is ideal for non-interactive scripts".


    WScript is WSH (Windows Script Host), if the PC doesnt have this installed then it wont work .. also the file extensions are .wsh.

    VBscript doesnt need to use Wscript but you can, same as VB6 can use Wscript. In some instances certain things can only be done in VBscript if you use Wscript .. such as Sleep and Shell ..

    not sure if Visual Basic Scripting Edition comes with some WSH built in or whether it is installed seperately .. I dont remember ever installing either, just comes on Windows XP i think.

    Dont forget the .hta applications also, which are basically HTML pages with Client side VBScript ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width