The code in question has worked in more or less the exact same configuration on earlier releases of Windows, however, it is not known to have run on Windows 7 YET! That\'s w
C:/cygwin/bin/bash -c '/cygdrive/c/opt/ST/v3.3/bin/ST.exe'
This won't work because your working directory is where you reside when you executed this command. You will have to copy the cygwin dependent dlls to the directory you execute this from. Othwerwise, you will have to place the cygwin bin directory in your system PATH variable, not sure you want to do that, can cause dll hell.
Also, if you're using anything in your profile, you need to add --login parameter to bash:
bash --login -c
Also, print the final command out at the end, before you spawn the process:
printf('%s\n',cmd)
Just to be sure it's exactly what you want.
You may also run the program with strace, if you're unsure about the dlls being referenced.
Several ways.
cygwin1.dll needs to be in %WINDIR%\system32 or equivalent.
or
you modify the PATH variable to add the path to cygwin1.dll in the caller's environment.
or
you call a .bat file that sets the environment before you call the cygwin built exe.
or
you build a standalone version of the .exe (i.e. no cygwin dependency).