• Welcome to Theos PowerBasic Museum 2017.

IWshExec.Terminate Method

Started by José Roca, July 14, 2008, 08:38:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca



The following code demonstrates how to use the Terminate method to stop a running script.

JScript


var aScript = WScript.Exec("%comspec% /c myScript.js");
aScript.Terminate();



PowerBASIC


DIM pWsh3 AS IWshShell3
DIM pWshExec AS IWshExec
pWsh3 = NEWCOM "WScript.Shell"
pWshExec = pWsh3.Exec(UCODE$("%comspec% /c myScript.js"))
pWshExec.Terminate