There is a method, but it requires a lot of work and is not 100% reliable.
The idea is that you determine the origin of every executable (i.e. the organization/person that produced the executable) and then decide if you trust each origin. You could, for example, decide that each executable produced by Microsoft is benign (i.e. not malicious). You would also need to ascertain that each executable produced by Microsoft as not been tampered with.
One way to do this is to check digital signatures (AuthentiCode) of executables. AuthentiCode uses PKI signatures to 1) identify the origin and 2) detect modifications to the executable. Sysinternals has a tool to automate this: sigcheck.
But this is a theoretical approach, there are some practical issues that prevent this method from being foolproof.
First issue is that not all executables are signed (not only scripts, but also binary executables).
Second issue is that you have to decide for each origin if you trust it or not. It might be easy to decide to trust Microsoft (which you implicitly do because you use Windows), but it might be less obvious for other origins. Because malware authors have been known to buy code signing certificates to sign their malware. And there is the example of Stuxnet: a component of the Stuxsnet malware was signed with a certificate that was stolen from a Taiwanese company (Realtek). So it was signed with the Realtek certificate because of a compromised key, but did not originate from Realtek.
This post has been edited by Didier Stevens: 31 May 2011 - 05:51 AM