Previous Section Table of Contents Next Section

Running Encoded Scripts

Encoded scripts can normally be executed just like any other script, with a couple of caveats. First, if your scripts don't include <SCRIPT> tags, the filename extensions must be either VBE (for VBScript) or JSE (for Jscript). The different filename extension tells WSH that it needs to decode the script before executing it; if you change the filename extension to VBS (or JS), you receive a runtime error when executing the script.

When the Encoder goes to work on a file that does use <SCRIPT> tags, it changes the LANGUAGE attribute. <SCRIPT LANGUAGE="VBScript"> becomes <SCRIPT LANGUAGE="VBScript.Encode">, for example, giving WSH the cue it needs to decode the script before trying to execute it.

    Previous Section Table of Contents Next Section