docs

Home All functions Categories

vuRun(Filename, WStyle, Wait)

vuRun(*CSTRING,LONG,LONG), Signed

Description

Runs a program using the Windows Shell with the specified window style and wait behavior.

The Filename parameter is passed as a single command line string. This means it can contain the fully qualified path to the program followed by any runtime parameters.

Parameters

Parameter Data Type Description
Filename CSTRING(256) Fully qualified path and filename of the program to run. May also include runtime parameters in the same string.
WStyle LONG Window style for execution:
0 = Hidden
1 = Normal with focus
2 = Minimized with focus
3 = Maximized with focus
4 = Normal without focus
6 = Minimized without focus
Wait LONG Execution wait flag:
0 = Return immediately and do not wait for completion
1 = Wait until the program completes

Returns

A LONG value:

Example

Filename = 'C:\Windows\Notepad.exe mydoc.txt'
WStyle   = 1   ! Normal with focus
Wait     = 1   ! Wait for program to complete

IF vuRun(Filename, WStyle, Wait)
  MESSAGE('Program executed successfully.')
ELSE
  MESSAGE('Failed to run program.')
END

Notes

Filename = '"C:\Program Files\MyApp\MyTool.exe" /x /y'
Home All functions Categories