Polybench® Reference
Starts an external program, outside Polybench.



Starts an external program or file, outside Polybench. You may specify an executable, or a common file format, such as a PDF file.

It is possible to let Polybench wait for the external program to be exited again.

Take care not to use this in full-screen applications, because the program may start behind the application window.

An Action may use a Value and an Address
Value: URL or path of the program to start, or a file name of a type that is known by your operating system.
Address: Not used.



The program or file to start should be specified in the Value property that is requested for an action. The specified path will be started as if you start it in the Windows explorer. You can also specify file arguments, that must be surrounded by quotation marks. For example:

notepad.exe "C:\Testdocument.txt"
Starts Notepad, showing the file Testdocument.txt
doSomething.bat ""parameter 1" "parameter 2""
Starts a batch file, in which %1 becomes "parameter 1", and %2 becomes "parameter 2". So, it is allowed to have quotation marks inside the argument section.
doSomething.bat "parameter1 parameter2 parameter3"
Starts a batch file, in which %1 becomes parameter1, %2 becomes parameter2, and %3 becomes parameter3.

The value may contain one or more global variables (see link). Notice that there are global variables for standard Windows folders such as the Documents folder of the current Windows account. For example:

notepad.exe "$doc$\a text file.txt" will start the notepad with a text file that is located in the Documents folder of the current Windows account.

$applicationfolder$\some pdf document.pdf will open the specified PDF document that is located in the folder where the current application (.XMC file) is located.

Some standard file viewers are registerd by Windows and can be called without specifying the exact path to the executable file, for example:

C:\WINDOWS\system32\notepad.exe will start the Windows notepad program - but -

notepad.exe will also start the Windows notepad program, because it is registered by Windows.

hh.exe "mk:@MSITStore:$startupfolder$\Help\PolybenchManual.chm::/DF0600001.html" will open the Polybench manual on the page that shows the Glossary, using the program 'hh.exe'.

If you require Polybench to wait for the external program to exit, then that can be specified by writing WAIT behind the path and arguments.

Without WAIT, the external program is started, and then the action in your app is ready. Your app continues almost immediately. But sometimes you may want to start another external program only after the previous program has finished its tasks. In that case, you can make Polybench wait for the first program to exit, before starting the next.

To be more precize, when using WAIT, the execution of asynchronous actions (see below) is halted. For example SHOWPAGE is also an asynchronous action, so Polybench will wait switching to the next page until the external program has finished. Meanwhile, you application continues working and also synchronous actions (such as SET_PARAMETER and FUNCTION) will be executed.
So, be careful when using the WAIT feature, and indicate the user of your app that Polybench is waiting until the started program has finished.


Not used for this action.

Synchronous or asynchronous

This action is performed asynchronously with data processing. If an action is asynchronous, it is performed only after all synchronous actions in a sequence have been called. A synchronous action is performed immediately.