I have a nightly job on Windows Server 2003 that automatically updates itself by downloading its .exe from Amazon S3. I've noticed that when it performs the download and tries to run the newly downloaded .exe, it is immediately kicked back to the command line without actually running anything.
I can verify this by sticking the new version of the code directly on the server and watching it execute successfully, then uploading it to the "update" server, running the bootstrapper then running the .exe and observing it fail to execute.
I can only assume that this is due to Windows protecting me from running code from outside its trusted zone. How does a fella go about configuring it to allow code from this particular external location to execute?
Thanks!
Windows tracks whether or not a file has been downloaded from the internet (or expanded from a zip file, even) by use of file streams. There is a stream associated with the .exe which effectively says "I came from www.example.com".
If you want to disable it for that file, and since it is a batch job anyway, you can delete the stream using
http://www.microsoft.com/technet/sysinternals/utilities/Streams.mspx
HTH
Maybe by adding your S3 URL to your Trusted Zone?
Try this: go to the newly downloaded file, right-click and bring up the properties, check if there's a button 'Unblock'. If you download an executable, you need to specifically permit it to to run. I'm not sure how to do this in script, so this won't fix your problem but may get you a bit closer.
If you want to disable zone checking set the environment variable SEE_MASK_NOZONECHECKS=1, but don't. Run your executable via this script instead: