欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Windows 腳本宿主  

Exec 方法

在子命令外殼程序中運行應(yīng)用程序,提供對 StdIn/StdOut/StdErr 流的訪問。

object.Exec(strCommand)

參數(shù)

object
WshShell 對象。
strCommand
表示用于運行腳本的命令行的字符串值。該命令行看上去和從命令提示符處鍵入完全一樣。

說明

Exec 方法返回 WshScriptExec 對象,它提供有關(guān)用 Exec 運行的腳本狀態(tài)和錯誤信息,還提供對 StdIn、StdOut 和 StdErr 頻道的訪問。Exec 方法只允許執(zhí)行命令行應(yīng)用程序。Exec 方法不能用于運行遠程腳本。不要混淆 Exec 方法和 Execute 方法(后者屬于 WshRemote 對象)。

示例

下面的示例演示 Exec 方法的基礎(chǔ)。

[VBScript]
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")

Set oExec = WshShell.Exec("calc")

Do While oExec.Status = 0
     WScript.Sleep 100
Loop

WScript.Echo oExec.Status
[JScript]
var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("calc");

while (oExec.Status == 0)
{
     WScript.Sleep(100);
}

WScript.Echo(oExec.Status);

請參閱

WshScriptExec 對象