« Back to Product

Documentation

IPS_ExecuteEx

 string IPS_ExecuteEx (string $ProgramPath, string $Parameter, boolean $ShowWindow, boolean $Wait, int $SessionID) 

Parameters

ProgramPath

Full path to the program

Parameter

Parameter which is to be passed to the program (optional)

ShowWindow

True if the window should be displayed; False if the window should not be visible

Wait

Specifies whether to wait for the end of the program

SessionID

The user session ID, which is to be used (from Under XP from 0, 2003/Vista 1)

Returns

Empty string

Description

The command causes the start of the external program named ProgramName. The String parameter is passed as a request parameter to the program. The Boolean value Wait determines if the end of the program should be awaited or the calling script should be resumed immediately.

The SessionID parameter specifies in which user session, the program should be started. (In Windows 2003, for example multiple terminal sessions can be started parallel.)

Warning

Caution: While waiting for the program to end, the script execution time is extended accordingly. It is important to ensure that in the file "php.ini" the defined maximum duration will not be exceeded. Otherwise, the script exits with an error message. This is especially important if the program expects user input.

Example

//Notepad started
IPS_ExecuteEx("notepad", "", false, false, 0);
Any questions?