I've created a batch script for Adobe HDS Downloader, with a version of PHP 5.4 with all extension, portable, in a single file. KSV, you can use this for your script. This is a example video...
Code:
http://www.youtube.com/watch?v=WfkWxsY6BGQ
No need change environment variable, you can move script where you want. Like proxy I use Vidalia (Tor), and for sniff urls, HTTPFox plugin for Firefox.