You need to use a shell to execute your command. Use shell=True when you define the Task.
Environment variable expansion must made by a shell. Apply the same solution for Why do I get strange behavior when the Task command line has quotation?
Extending atheist
Related tools
Enter search terms or a module, class or function name.