path of executable

Hi,

how can i get the path of my own program?

I.e. my program was started from ‘c:\myprogram\program.exe’
and i want to show the path in a messagebox.

thx

Use the App.ExecutableFile property.

e.g.

MsgBox(App.ExecutableFile.NativePath)

per the lang ref

see
http://developer.xojo.com/app
http://documentation.xojo.com/index.php/Application
http://documentation.xojo.com/index.php/Application.ExecutableFile
http://documentation.xojo.com/index.php/FolderItem
http://documentation.xojo.com/index.php/FolderItem.NativePath

Hi all,

thx for the fast answers.

Problem solved.

regards

Hi Andrew,

Problem solved, but…

MsgBox(App.ExecutableFile.NativePath)

gives me the path + the name of the executable, but how
do i get only the path (w/o the name of the executable)?

regards

http://documentation.xojo.com/index.php/FolderItem.Parent

Please try searching the documentation at some point.

Hi Tim,

i had a long day and laziness kicked in.

But you’re right.

regards

Next time click the message that best answered it, rather than yourself. It helps the TLDR folks.