This following example is created by user Michael Dillon from this answer.
Consider the following script:
This script snippet does:
cscript command which calls itself with all the arguments provided.
As the part after
@set @junk=1 is commented(
*/ Are valid JScript comment),
JScript will ignore them.
Note: We need the
@set @junk=1 part because the batch file does not recognize
/* as a command, but a
set statement will be a workaround. JScript will recognize
/* as a comment so the other
batch file will not be executed by JScript engine.
You can add your JScript after
*/ and start extending your batch file scripting!