Running JScript in a CMD File


/ Published in: JavaScript
Save to your folder(s)

embed the JScript code in a .cmd file


Copy this code and paste it in your HTML
  1. @set @cmdinterop=1 /*
  2. @set @cmdinterop=
  3. @%SystemRoot%\system32\cscript.exe //NoLogo //E:JScript "%~f0" %* & exit /b
  4. */
  5. // JScript start here:
  6. var today = new Date();
  7. WScript.Echo(today);

URL: http://blogs.msdn.com/joshpoley/archive/2008/01/15/running-jscript-in-a-cmd-file.aspx

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.