home   about us   contact us  
Search site for:

Remote Command Execution

The basic idea is that we execute a command via the RUN statement, and redirect the output to a file. The output is then displayed to the user via an APPX output process.

To download the application, click here. Since this application is only useful in Windows environments, the zip file only contains the Intel version of the APPX code. It won't work on an Risc based system, although it would work on Intel based Linux systems. Of course, you don't need it on those platforms, since you have a command prompt. Also note this uses the '/w' on the DOS command line to make APPX wait until the command finishes executing. This feature is only compatible with APPX 4.x and higher.

To install the application, follow these steps:

1. Create a new application called RCS. You can use any version you want, so if RCS conflicts with an application you already have, just use a different version number.
2. Create the Design files, and extract the file you downloaded into the $APPXPATH/<version>/RCS/Data directory.
3. Attach the application RCS to a database. RCS does not use any files of it's own, so you don't need to create files.

Running the application:

There is only one INPUT in RCS, just run it. You will get a scrolling screen where you can enter a non interactive DOS command (such as COPY, DIR, etc). The command will run on the server, and the results will be displayed via an APPX output process. Since it's a scrolling input, you can go back to a previous command, modify it and re-execute it by pressing Enter.

The application also demonstrates some interesting techniques, such as getting the Process Id of your process (used to create a temporary file name) and printing a plain text file without importing it into an APPX file first.

Thanks to Pat Barnes of Query Software for the original technique, and Steve Glore of Consolidated Meat Group (Australia) for adding the output redirection and display.

Do you have a tip you want to pass on? Contact Us.

« Return

© Copyright 2020 - C.A.N.S.Y.S. West Limited All Rights Reserved