Skip to content

Commit

Permalink
引数に「-p」が含まれていたら、引数を継承し、URLではなくexeファイルを直接実行するように
Browse files Browse the repository at this point in the history
  • Loading branch information
esperecyan committed Sep 30, 2023
1 parent 772cebd commit a0a7602
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion バーチャルキャストを起動.js.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ var Shell = WSH.CreateObject('WScript.Shell');
*/
var EXE_URL = 'steam://rungameid/947890';

/**
* 実行ファイルのパス。
* @constant {string}
*/
var EXE_PATH = 'C:\\Program Files (x86)\\Steam\\steamapps\\common\\VirtualCast\\VirtualCast.exe';

/**
* 出力先フォルダパス。
* @constant {string}
Expand Down Expand Up @@ -316,7 +322,16 @@ for (var profileName in profileNameFilesPairs) { //eslint-disable-line no-redecl
}
}

Shell.Run('explorer ' + EXE_URL);
var parametersForVirutalCastExisted = false;
var command = '"' + EXE_PATH + '"';
for (var i = 0, l = WSH.Arguments.length; i < l; i++) {
var arg = WSH.Arguments(i);
if (arg === '-p') {
parametersForVirutalCastExisted = true;
}
command += ' ' + arg;
}
Shell.Run(parametersForVirutalCastExisted ? command : 'explorer ' + EXE_URL);
})();


Expand Down

0 comments on commit a0a7602

Please sign in to comment.