Skip to content

Instantly share code, notes, and snippets.

@LAK132
Last active September 3, 2019 09:30
Show Gist options
  • Save LAK132/32c0ac4e5f22a3260a47c05858038cd2 to your computer and use it in GitHub Desktop.
Save LAK132/32c0ac4e5f22a3260a47c05858038cd2 to your computer and use it in GitHub Desktop.
@if (@a==@b) @end /*
@echo off
SetLocal EnableDelayedExpansion
for /f "delims=" %%A in ('cscript /nologo /e:jscript "%~f0" %*') do ( call %%A )
goto :eof
*/
var print = function(str) { if (str) WSH.Echo("echo " + str); }
var system = function(str) { WSH.Echo(str); }
var argc = WSH.Arguments.Length;
var argv = function(ind) { return WSH.Arguments(ind); }
print("Hello, World");
system("type javascript.bat");
if (argc >= 1) print(argv(0));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment