Previous Section Table of Contents Next Section

Installing the Script Encoder

Microsoft's Script Encoder can be downloaded from the Scripting Web site at http://msdn.microsoft.com/scripting. Just click the Download link and look for the Script Encoder. You can find complete documentation online at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/seconscriptencoderoverview.asp.

The Script Encoder is a command-line tool, and is designed to run against an already-written and debugged script. After you encode the script, you cannot change it; if you do need to make changes, you have to work with the original unencoded version and then re-encode the changed script.

Encoded versus Encrypted

The Script Encoder looks like a form of encryption. In a way, in fact, it is a form of encryption: Clear-test script code is run through a mathematical algorithm and the result is illegible (at least to humans). The Windows Script Host understands how to decode the script, though, allowing it to retrieve the original script code and execute it. Therefore, the Encoder can be said to use a form of encryption.

However, the Encoder isn't designed to foil all attempts at accessing your source code. All scripts are encoded using the same algorithm, so that any copy of the Windows Script Host can decode and execute the script. That means it isn't impossible-or even necessarily difficult-for a clever person to figure out the encoding algorithm used and create his own decoder.

You can rely on the Encoder to stop casual access to your source code, and to stop casual users from attempting to modify your scripts. However, you cannot rely on the Encoder to provide absolute protection for your scripts.


    Previous Section Table of Contents Next Section