According to MSDN, you can use:
var oL = new ActiveXObject("WScript.Shell");
oL.CurrentDirectory = "C:\\Foo\\Bar";
oFile = '"C:\\Application.exe"';
oL.run(oFile);
... if you use this script in a Windows script Host, and in this case, you probably should make it clear in your question - about 99% of JavaScript programmers use only the language on the Internet browser, where this kind of material is possible only in extremely unusual conditions.
source
share