The iASP_Exec component allows developers to execute a server-side application
or command from a web page. iASP_Exec lets you:
- Execute a system command
- Execute an application
- 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
- Creating the object
- Setting a few properties
- 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 |
|