DesktopApplication.ExecutableFile

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Read-Only Property (As FolderItem )
FolderItemValue = aDesktopApplication.ExecutableFile

New in 2021r3

Supported for all project types and targets.

Returns a FolderItem for the actual executable application even if it is in a bundle.

Notes

Application.ExecutableFile returns Nil if the app has been deleted or an error occurs finding it.

Sample Code

Use the properties and methods of the FolderItem class to get/set attributes of the executable file and/or perform operations. For example:

Var appPath As String
appPath = App.ExecutableFile.NativePath

gets the full path to the executable.

Var cd As DateTime
cd = App.ExecutableFile.CreationDateTime

gets the date/time the executable was created.

You can get the location of the folder in which the app is running, by getting the Parent of the executable file:

Var f As FolderItem
f = App.ExecutableFile.Parent