How to launch an executable in the same directory as my program binary?

I have a Xojo program that needs to launch another program that’s in the same directory as itself (or maybe one level beneath it). For the life of me, I can’t figure out how to do that! I know it has something to do with using Shell but I don’t quite know how to specify the location of the binary.

Can someone help?

Thanks!

folderitem.launch is what you need.
The trick is setting the folderitem to be your helper app

  1. You could use AppleScript: tell application “xyz” to activate
  2. Use Launch Services to locate your app. Then use launch.
  3. Start with app.executablefile. Then parent and child yourself to your app and finish with launching.
Dim f as folderItem = app.Executablefile.Parent.Child("myprog.exe")

Assuming it is a Windows or Linux program. It would be slightly different on Mac.