Run Program()を使用した.batファイルの実行JSLから.batファイルを実行しようとしていますが、期待どおりに動作しません。
何が欠けていますか?
https://www.jmp.com/support/help/en/15.1/#page/jmp/run-external-programs.shtml
rp = RunProgram( Executable( "cmd.exe" ),
Options( {"C:\temp\myfile.bat"} ),
ReadFunction("text") // returns all text
);
//"Microsoft Windows [Version xxx]
//(c) 2018 Microsoft Corporation. All rights reserved.
//
// C:\Program Files\SAS\JMPPRO\15>"スクリプティングRe:Run Program()を使用して.batファイルを実行する1つのパラメーターがありません
rp = RunProgram( Executable( "cmd.exe" ),
Options( {"/C", "C:\temp\myfile.bat"} ),
ReadFunction("text") // returns all text
);Re:Run Program()を使用して.batファイルを実行するコマンドは、MS-DOSまたはcmd.exeでcmd / cを使用して実行できます。実行するコマンド文字列も追加します。たとえば、ping poftut.comを実行する場合は、次のコマンドを発行します。コマンドは、コマンドを実行し、コマンドの実行が完了した後に終了するプロセスを作成します。コマンドを囲むために”二重引用符を使用することも非常に便利です。
-> cmd / c "ping poftut.com"Re:Run Program()を使用して.batファイルを実行する引用符がなぜ難しいのかを説明しているサイトを見つけました。
https://community.jmp.com/t5/Discussions/Unable-to-parse-speechmarks-quot-quot-into-powershell-using/mp/245968/highlight/true#M48328