a = new ActiveXObject("wscript.shell");
a.run("explorer.exe, \"E:\"");//本地文件夹路径
a.run("explorer.exe, \"\\\\192.168.0.95\"");//局域网内机器文件夹路径,这个地方有时候这样写并不行,可以在ip前加File:///
a.run("notepad.exe, \"a.txt\"");//打开txt文件
a.run("winword.exe, \"a.doc\"");//word文件
注意:run()的两个参数,进程名和文件(或文件夹路径)。
a.run("rundll32.exe");//重启机器