docs

Home All functions Categories

vuRunEx(pFile, pParams, pWork, ShowCmd)

vuRunEx(*CSTRING pFile, *CSTRING pParams, *CSTRING pWork, LONG ShowCmd), LONG

Description

Runs the specified file with optional command-line parameters, working directory, and window display options.

Parameters

Parameter Data Type Description
pFile CSTRING(260) Full path to the executable file to run.
pParams CSTRING(260) Optional command-line parameters to pass to the executable.
pWork CSTRING(260) Optional working directory for the executable.
ShowCmd LONG Window display option (see ShowWindow constants, e.g., 1 = Normal window).

Note: In vuFileTools V5, CSTRINGs are not limited to the size shown above. The numbers are for example only.

Returns

A LONG value indicating the result:

Example

FilePath   CSTRING(260)
Params     CSTRING(260)
WorkFolder CSTRING(260)
ShowCmd    LONG
Ret        LONG

FilePath   = 'C:\Windows\notepad.exe'
Params     = ''
WorkFolder = ''
ShowCmd    = 1   ! SW_SHOWNORMAL

Ret = vuRunEx(FilePath, Params, WorkFolder, ShowCmd)

MESSAGE('vuRunEx returned: ' & FORMAT(Ret), 'vuRunEx Test')

Notes

Use ShowCmd to control how the launched application window is displayed (normal, minimized, maximized, etc.).

If the working directory is empty, the system default is used.

Home All functions Categories