「コマンドプロンプトを開く」の版間の差分

MSY-07 (トーク | 投稿記録)
ソースコードの整形
MSY-07 (トーク | 投稿記録)
文の末尾にセミコロンを追加
8行目: 8行目:
// コマンドプロンプトを開く.js
// コマンドプロンプトを開く.js


var shell = new ActiveXObject("WScript.Shell")
var shell = new ActiveXObject("WScript.Shell");
var path = document.Path
var path = document.Path;


if (path == "") {
if (path == "") {
path = shell.SpecialFolders("Desktop")
path = shell.SpecialFolders("Desktop");
}
}


shell.CurrentDirectory = path
shell.CurrentDirectory = path;
shell.Run("cmd")
shell.Run("cmd");
</syntaxhighlight>
</syntaxhighlight>
スポンサーリンク