Skip to main content

LaunchFile

Structure

LaunchFile(sFileName, sStartInDir, sParameters : String)

Type

Procedure

Description

This function will send a command to Windows to attempt a launch of the sFileName parameter. Windows will look for the file in the sStartInDir (if the full directory location is contained in sFileName then sStartInDir can be blank). Optional sParameters can also be provided. This functionality is similar to an exe launched from the Windows 'Run' interface.

Parameters

ParameterTypeDescription
sFileNameStringSpecifies the file (exe, etc.) that should be launched.
sStartInDirStringThe directory where Windows should look for the sFileName. If the full directory location is contained in sFileName then sStartDir can be blank.
sParametersStringOptional

Example

' this would launch an empty Notepad document
LaunchFile('Notepad.exe', 'C:\Windows', '')