spacer
   
   
Mailtraq - the Complete Email Server
   
spacer

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

spacer
spacer

ShellExecute()

This function is very similar to ExecuteAsync(), in that it is used to run a program without waiting for it to terminate. However, this command concentrates on files (or documents), rather than the applications used with them. Essentially, the given parameters are passed to the Windows Shell to be handled rather than by calling the application directly. This also makes it possible for the Shell to select an appropriate program to run for a given filename. For example, given the filename of a text document, the Shell may open it using Notepad or WordPad . Specific programs may also be run using this function but you do not need to know their filenames (providing the Shell can locate them).

ShellExecute( filename [ [ [ , parameters ] , command ] , directory ] )

filename
The filename of the document to be opened, or the application to be executed. If the filename is an application in the Windows Path a full path-name is not required
parameters
Optional parameters given to the application eventually called by the Shell
command
Optional; "open" or "print", defaulting to "open"
directory
Optional; a string specifying the working directory. Defaults to the database folder.

This example is similar to that shown in ExecuteAsync(). The advantage being that it is not necessary to know the location of the text editor or even which text editor is registered. Note that the Shell selects an application based upon the file's extension (".txt" in this example). To edit a text file which ends with a different extension it is necessary to specify the application as shown in the example expression supplied with the ExecuteAsync() function.

// Open the specified file using the default system text editor.
ShellExecute("c:\temp\info.txt")

Note

Use ShellExecute to run DOS batch files.

spacer


Download Trial
Buy now
Screenshots
Requirements
Feature Tree
FAQs
What's new
Print this page Print this Page
Mailtraq 2.12 PDF Datasheet
Send a friend an email about Mailtraq ShareMailtraq - Email Server at Delicious Mailtraq - Mail Server at digg Mailtraq - Mail Server at FacebookMailtraq - Email Server at stumbleupon Tweet about Mailtraq

 

 

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