in reply to Windows Share Access from CGI Script
It looks like a permissions issue from here. When you run this from the command line, it runs with your permissions. When a cgi runs under IIS, I believe it runs under the user IUSR_YourServerName. I am depending on memory here, and a couple of excursions into Google to confirm, so anyone feel free to correct me.
To get access to this share, you would have to grant write permissions to IUSR_YourServerName, which is probably not a great idea, unless this is internal only. It really depends on how secure you need this to be.
Good Luck,
digger