CScript vs WScript JavaScript vs JScript

2012年2月18日 添加:
From:http://technet.microsoft.com/library/ee176996.aspx 

Cscript and Wscript

 Cscript and Wscript are the two script hosts within the Windows Script Host (WSH) environment. Unless you specify otherwise, Wscript is the default. 

 

Setting the Default Script Host 

cscript //H:cscript

wscript //H:wscript
 

Cscript vs. Wscript

The difference between Cscript and Wscript is that Cscript is the command-line version of the script host and Wscript is the graphical version. This difference isn’t really noticeable unless your script uses the Wscript.Echo command. As you’ve already seen, if you use Cscript your output from a Wscript.Echo statement will, by default, display to the command window; if you use Wscript that output will display in message boxes. There are other slight differences between the two, but Wscript.Echo is the most obvious and the one you’re likely to run into most often.

参考:

Jscript vs Javascript

http://javascript.about.com/od/reference/a/jscript.htm

About Javascript http://msdn.microsoft.com/en-us/library/cte3c772(v=vs.85).aspx


原来的 
Using the command-based script host (CScript.exe)

Cscript.exe is a command-line version of the Windows Script Host that provides command-line options for setting script properties.

With Cscript.exe, you can run scripts by typing the name of a script file at the command prompt. Like Microsoft Internet Explorer, Windows Script Host serves as a controller of Windows Script compliant scripting engines, but Windows Script Host has very low memory requirements. Windows Script Host is ideal for both interactive and non-interactive scripting needs, such as logon scripting and administrative scripting.

Windows Script Host supports scripts written in VBScript or JScript. When you start a script from your desktop or from the command prompt, the script host reads and passes the specified script file contents to the registered script engine. The script engine uses file extensions (that is, .vbs for VBScript and .js for JScript) to identify the script. As a result, you do not need to know the exact programmatic identifier (that is, the ProgID) of the script engine. The script host maintains a mapping of script extensions to programmatic identifiers, and uses the Windows XP association model to start the appropriate engine for a given script. For more information about Windows Script Host, seeWindows Script Host For more information about CScript.exe, see To run scripts using the command-line-based script host (cscript.exe)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值