From Xojo Documentation
Returns a FolderItem for the actual executable application even if it is in a bundle.
Application.ExecutableFile returns Nil if the app has been deleted or an error occurs finding it.
Use the properties and methods of the FolderItem class to get/set attributes of the executable file and/or perform operations. For example:
gets the full path to the executable.
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: