- 100 名前:デフォルトの名無しさん [2006/11/01(水) 14:06:23 ]
- バッチファイルにJScript.NETスクリプトを埋め込むテスト
※ pc8.2ch.net/test/read.cgi/tech/1148485555/65 を参照 /rスイッチは.exeが存在しても強制的にコンパイル [hello.cmd] @if (0==1) rem [hello.cmd] @echo off if exist "%0.cmd" "%0.cmd" %1 setlocal path %SystemRoot%\Microsoft.NET\Framework\v2.0.50727 set source=%0 set target=%source:.cmd=.exe% if /i "%1"=="/r" goto build if exist "%target%" goto run :build jsc /nologo /out:"%target%" "%source%" :run "%target%" goto :eof @end // ここからJScript print("hello, world!");
|

|