Mailtraq - the Complete Email Server
   

Enstar for Mailtraq email server sales & support
Making world-class Internet technology affordable  

Search for:

Advanced search

Execute()

Calls an external application with supplied parameters. Execute() suspends the script in which it is used until the called application terminates. Use the ExecuteAsync() function if script execution needs to continue immediately.

Although it is possible to send information to the executed application via command line parameters, there is no means for the application to pass information back to the script. However, it may be useful for the application to store information in an external file in a known location, perhaps one passed as a parameter, which the script can then open and read. If this method is chosen the ExecuteAsync() function should not be used because it is uncertain whether the application will have completed writing its output file by the time the script attempts to open it.

Execute( application [ , parameters ] )

application
The full path name of the application to execute
parameters
The space separated parameters to be passed to application. These are the same as the command-line parameters which might be issued if the application were to be executed from the Windows shell.

Runs the Notepad text editor (assuming that Windows has been installed into the "c:\windows" directory) and provides the filename to open. A more effective text editing example is given for ShellExecute()

Execute("c:\windows\notepad.exe", "c:\windows\temp\info.txt")
Mailtraq Highlights...
 SMTP Server     Mailtraq SMTP email server video IMAP Server     Mailtraq IMAP email Server video
 POP3 Server     Mailtraq POP3 email server video Proxy Server     Mailtraq proxy email server video
 Webmail Server     Mailtraq webmail email server video Mailing-list Server     Mailing list email server video
 Groupware Services     Mailtraq groupware email services video Spam and Virus control     Spam and virus control email server video

 

   Copyright © 2003 - 2011 Enstar Ltd, Enstar LLC & Fastraq Ltd. All rights reserved. Privacy policy.
   Mailtraq® is a registered trademark of Fastraq Limited.