It's encouraged to provide a script if you can, letting the OP do some effort and learn from executing your answer. If he downloads the executable he is just lazy, as a result he won't learn anything from it and will ask a new scripting question next time; rinse and repeat. If he instead learns how the script was made and gets compiled, he might be on his road learning how to script while getting his solution. It's a win-win situation to let him do it himself, instead of doing it for him and wasting your time...
What we do when we pass along executables:
Warning: This post contains an executable file, as we are uncertain whether it contains malicious code you download this file at your own risk. Super User is not responsible for any harm this file could do to your computer.
Many users are reviewing answers, including those posted by new users, but also regulars.
When there's doubt about the origin of the file, we usually edit in a warning somewhat like the above one, then we run the file through some stuff in a virtual machine to get an idea what the file really does.
For example, we once had a packed executable that's not only packed once, but multiple times, at the deepest level (4 or 5 times). It became clear that this was hiding malicious code and hence we removed the link. In fact, the user posting the answer even claimed that one needed to disable any anti virus software to get the executable to run.
Even more so, the programmer was dumb enough to use University's computers to develop his software. So, if we went further on that one we could have eventually traced it back to the author...
To summarize, it's best to warn users until it is clear whether it is clean or not, at least for executable files. These posts are often obvious given that they are not trying to solve the OP's problem, but rather trying to get you to download the file and execute it.
And well, sometimes it does happen that someone goes around and do that, then the whole lesson is:
Virus scanners, back-up software, updates and other security measures exist; better safe than sorry.