The Script Encoder has the following simplified syntax:
screnc inputfile outputfile
where inputfile is the target file containing script to be decoded, along with its optional path, and outputfile is the file containing encoded script that the Script Encoder is to create, along with its optional path. Note that inputfile and outputfile can include the standard wildcard characters.
The Script Encoder also accepts the following optional command-line switches:
/?
Display help information for the Script Encoder.
/f
The output file is to overwrite the source file, which means that the original decoded source file is lost. With the /f switch, outputfile need not be specified. By default, the Script Encoder will not overwrite inputfile.
/s
The Script Encoder is to work in silent mode, without producing screen output. By default, the Script Encoder produces verbose output.
/xl
Specifies that the Script Encoder should not add the @LANGUAGE directive to the top of ASP files. (The @LANGUAGE directive determines the scripting language used by ASP to process the page; VBScript is the default.) By default, the Script Encoder adds an @LANGUAGE directive whenever it encodes an ASP page.
/l defLanguage
Defines the default scripting language for the Script Encoder to use. Script blocks lacking a LANGUAGE attribute are assumed to be written in this language. If no language is specified, the Script Encoder otherwise assumes that JScript is the default language for HTML pages and .js files, and that VBScript is the default language for ASP and .vbs files. The Script Encoder does not recognize a default language for Windows Script Component (.wsc) files. Either the LANGUAGE attribute must be specified in the file's tag, or the /l switch must be used; otherwise, no script will be encoded.
Associates inputfile, whose file extension does not correspond to a scriptable file type, with a recognizable file type. Recognized extensions are .asa, .asp, .cdx, .htm, .html, .js, .sct, and .vbs.