<< back to sysax.com Product page

9.5. Executing Local Programs

The FTPRunProgram method can be used to execute a local program. The specified program can be run by logging in as a specific user. The program can also be terminated forcibly after a specific timeout value has expired. An expected exit code can also be passed in so that IsFTPSuccess is set as successful only if the program returns the correct exit code on termination.

Exhibit 9.9. IDL Definition of method to executing local programs


FTPRunProgram ([in] BSTR b_progname, [in] BSTR b_progparam, [in, defaultvalue("")] BSTR b_userlogin, [in, defaultvalue("")] BSTR b_userpass, [in, defaultvalue(0)] UINT n_timeoutval, [in, defaultvalue(0)] UINT n_expexitcode);


Exhibit 9.10. Example usage of method to executing local programs (VBScript)


app.FTPRunProgram "c:\\myprogram.exe", "/debug", "", "", 0, 0