Hi Peter.
This works for me on Win7 with DMD2.061 http://dpaste.dzfl.pl/64529e76in this example here you are mixing (] parentheses :O Don't think this is your real code, is it :O
| | V V
environment("PATH"] = pathSeparator ~ path ~ pathToMyDir ; // failed, unidentified identifier