Encodes scripting source code so it cannot be easily viewed or modified by users.
SCRENC [/s] [/f] [/xl] [/l defLanguage ] [/e defExtension] input file output file
The Script Encoder syntax has these parts:
There are four kinds of files than can be processed by the Script Encoder. They are:
ASP. This format consists of a text active server page containing valid HTML and embedded scripting blocks within <SCRIPT> ... </SCRIPT> tags or <% ... %> tags. Applications that use this format include Microsoft® Internet Information Services (IIS). Recognized file extensions are .asp, .asa, and .cdx.
HTML. This format consists of a text file that contains valid HTML along with embedded script blocks. Applications using this scripting format include Microsoft FrontPage®, Microsoft® Visual InterDev™ and virtually all Web designers and browsers. Recognized file extensions are .htm and .html.
Plain text. This format consists of text file that contains only script with no surrounding tags. Applications using scripting format include Windows® Scripting Host (WSH) and Microsoft® Outlook®. Recognized file extensions are .js and .vbs, which are changed to .jse and .vbe, respectively, after encoding.
Scriptlet. This format consists of a text file that contains valid scriptlet code within <SCRIPT> ... </SCRIPT> tags. Recognized file extension is .sct and .wsh.
The following are examples of the use of the Script Encoder and a brief explanation of the results:
To encode input file test.html and produce output file encode.html, use:
screnc test.html encode.html
To encode input file test.htm and overwrite the input file with the encoded output file, use:
screnc /f test.htm
To encode all .ASP files in the current directory and place the encoded output files in c:\temp, use:
screnc *.asp c:\temp
To encode all files in the current directory as .ASP files and place them in c:\temp, use: screnc /e asp *.* c:\temp
To encode input file test.htm and produce output file encode.htm, ensuring that all script blocks that don't have a language attribute specified use VBScript, use:
screnc /l vbscript test.htm encode.htm
To encode all scriptlet files in the current directory and overwrite them with encoded files, while displaying no message, use:
screnc /s /f *.sct