Open an .exe file from Max patch
Hi,
Is there any way I could open a windows .exe file from Max MSP patch?
I have tried using
;
max launchbrowser [path to file]
without sucess
;
max launchbrowser file:///C:/Users/Admin/Desktop/myexe.exe
I dabbled with this for a while before I came up with my present method. Using (;max lauchbrowser) works but only because the current versions of Internet Explorer and Edge will accept filenames as well as Web addresses. This has not always been the case and there is no guarantee that it will always work in the future. The Max techies explained to me that (;max lauchbrowser) was never designed to be used like this and is dependant on external features that C'74 has no control over, hence why they refuse to make reference to it in the help files.
I have come to prefer using [shell] instead. [shell] was written for Max by Bill Orcutt and Jeremy Bernstein donkey's years ago but still works. I'm surprised that it (or something like it) is not included in Max. You would need to download [shell] from:
To install, drag the "shell.mxe64" file into the "Library" folder in the Max folder of your "Documents" and drag the "shell.maxhelp" into youir "Program Files\Cycling '74\Max\resources\help\max\" folder and restart Max.
[shell] essentially gives you access to all the Windows command line functionality so to run your external application you just need to send the full pathname of the file into [shell] and you can also pass commandline options and switches to your app if required (see righthand example below).

Likewise, [shell] will execute any recognised Windows command line instruction, "taskkill" being another useful one. You will find lists of useful instructions via Google.

Be aware that in Windows, you need to "double escape" the backslashes if you type pathnames into a message box, as per my examples.
I have also attached a patch that I use to check the integrity of my studio MIDI system that uses [shell] to check that all 4 X-Touch control units are connected and working by pinging them and that the rtpMIDI service is installed and running correctly:
That is just great!
Thanks!