correct path for windows using launch

edited December 2015 in Programming Questions

this code don't work on windows

launch (sketchPath("programa/test.exe"));

This code works on mac

launch (sketchPath("programa/"));


programa (directory)


What is the correct path n windows for launch a external app from my aplication?


  • If the app isn't inside sketch's own folder, it makes no sense to call sketchPath() or dataPath()!
    You're gonna need its full path instead! Perhaps something like this? :-/
    launch("C:/Program Files/programa/test.exe");

  • the problem is that i don't know where the user are going to install the program. In windows don't work launch("/programa/test.exe"); but in OSX works.

  • Then it's better ask the user for the file w/ selectInput() then:

  • ok, i see. But if y put test.exe in the root directory where the main aplication is, launch ("test.exe") will work under windows os?

  • Windows OS got more than 1 "root" directory!
    Each 1 is 1 letter, like "C:\" for example. :-B

  • je, I mean: My aplication is in, for instance in "C:\myaplication", the name: program.exe, and inside program.exe is a button that call test.exe, wich is in the directory myaplication also. in windows launch("test.exe") works?

  • Answer ✓

    If "test.exe" is inside the same folder as your ".pde" file, then you can use sketchPath() on it!

  • ok!!! thank's!!

Sign In or Register to comment.