| Home | All functions | Categories |
vuRun(*CSTRING,LONG,LONG), Signed
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.
| Function | Separate File/Params | Working Folder | Delay | Wait | Best Use |
|---|---|---|---|---|---|
| vuRun | No | No | No | Yes | Simple or legacy command-line launch with optional wait |
| vuRunDelay | No | No | Yes | No | Simple delayed launch |
| vuRunEx | Yes | Yes | No | No | Preferred modern launch with separate parameters |
| vuRunExWait | Yes | Yes | No | Yes | Modern launch with separate parameters and wait |
| vuRunExDelay | Yes | Yes | Yes | No | Modern delayed launch with separate parameters |
| vuRunExDelayWait | Yes | Yes | Yes | Yes | Modern delayed launch with separate parameters and wait |
| vuRunExists | No | No | No | No | Open a file or app only if the target already exists |
| vuRunExistsEx | No | No | File wait | No | Wait for a file to appear, then open it |
| 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 |
A LONG value:
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
Filename is treated as one command line string, so parameters must be appended correctly.Filename = '"C:\Program Files\MyApp\MyTool.exe" /x /y'
WStyle = 0 requests hidden execution.Wait = 1 tells vuRun to wait for the launched program to finish before returning.vuRun works well for simple launches and legacy compatibility.| Home | All functions | Categories |