貼り付けて、ボタン押すだけ。vbscript, jscriptの実行。
scriptTester.zip
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.IO; using System.Diagnostics; namespace scriptTester { public partial class Form1 : Form { public Form1() { InitializeComponent(); KeyDown += (object o, KeyEventArgs e) => { if (e.KeyCode == Keys.Escape) quit(); }; vbs_src.Text = "set ws = createobject(\"wscript.shell\")\r\n" + "set fso = createobject(\"scripting.filesystemobject\")\r\n" + "set regex = new regexp\n"; js_src.Text = "var ws = new ActiveXObject(\"wscript.shell\");\r\n" + "var fso = new ActiveXObject(\"scripting.filesystemobject\");\r\n"; } private void vbs_exec_Click(object sender, EventArgs e) { createExec(Path.GetTempFileName() + ".vbs", vbs_src.Text); } private void js_exec_Click(object sender, EventArgs e) { createExec(Path.GetTempFileName() + ".js", js_src.Text); } private void createExec(string filename, string src){ StreamWriter srcFile = new StreamWriter(filename); srcFile.WriteLine(src); srcFile.Close(); Process.Start(filename); } private void quit() { this.Close(); } } }