iASP_Exec Component

Overview

The iASP_Exec component allows developers to execute a server-side application or command from a web page. iASP_Exec lets you:

  1. Execute a system command
  2. Execute an application
  3. Wait for a process to complete and set a process property

To use this iASP component move the .jar file to classpath.

Simple Example

Using the component is as simple as

  1. Creating the object
  2. Setting a few properties
  3. Calling the Retrieve method

Set
Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application ="ping"
Executor.Parameters ="127.0.0.1"
strResult = Executor.ExecuteDosApp

Properties

Property

Description

Application Sets the path (optional) and executable filename
Parameters Sets the executable file parameters
TimeOut Sets the timeout to wait (milliseconds)
Used only for ExecuteDosApp and ExecuteWinAppAndWait
ShowWindow Sets whether the executing app is visible or not
Used only for ExecuteWinAppAndWait and ExecuteWinApp

Methods

Method

Parameters

Return Value

Description

ExecuteDosApp String String Executes the specified app as a console app and returns  stdio as string.
ExecuteWinAppAndWait String String Executes the specified app as a Window app and waits for the specified timeout if exec is successful
ExecuteWinApp String Integer Executes the specified app as a Window app and returns result code immediately

Copyright © 1998-2002, Halcyon Software Inc. All rights reserved.