Hi Brita,
First I should mention that defining a shell environment variable will not tell Windows what do do. This comes down to the way that cygwin runs. Unlike a normal Windows command prompt where you can type something like 'echo Command1&echo command2' to run two commands, if you do this with command one launching cygwin and the second command running your shell command then this will not happen. Instead only cygwin will be started and the second command is forgotten about. Because you can't do this in a normal command prompt, you will not be able to do this using SPAWN. However, I think that there is a workaround to create a script file with launches cygwin, runs a script in cygwin and then returns to the command prompt. This way the SPAWN command will actually return to IDL and you should have your result within IDL. Otherwise the command prompt with cygwin will be running and expecting input, which means IDL will wait until it is finished. I found the following web page which discusses how to launch cygwin, run a shell script, and provides an example:
http://blog.dotsmart.net/...-scripts-on-windows/
Hope this helps!