home *** CD-ROM | disk | FTP | other *** search
- // ActiveExec.js 1.5
- // (c) 1998, Activity Software
- //
- // This is an example of using ActiveExec within Windows Scripting
- // Host. It also serves to show how to implement ActiveExec.DLL in
- // JScript.
- //
- // This example assumes installation of ActiveExec and assumes WindowsNT is
- // installed in the C:\WINNT directory. If this is not true, change the
- // CommandLine variable to the correct path.
- //
- // Requires: ActiveExec.DLL, Windows Scripting Host
- //
- // To execute: CSCRIPT.EXE ACTIVEExec.JS
-
- // Create an instance of the ActiveExec object
- proc=WScript.CreateObject("ActiveExec.Process");
-
- CommandLine = "c:\\winnt\\system32\\ping.exe www.activitysoft.com";
-
- // Execute the command stored in the CommandLine variable
- proc.Execute(CommandLine);
-
- // Display the returncode of the application
- WScript.Echo(proc.ReturnCode);
-
- // Display the text output by the call to PING.EXE
- WScript.Echo(proc.OutputStream);
-
-
-
-