How to give directory path in javascript?

function RunProcess()


MyObject = new ActiveXObject("WScript.Shell")

var therapy = document.getElementById("therapy");
therapy.onclick = function(){
MyObject.Run(""D:\s\TherapyVisit.bat"",1,false) ;


The path in Run method always changes, how can i make it get the directory path?


Browser doesn’t have access to the filesystem.

My guess is it will work in browsers that supports ActiveX (ActiveX is evil) and with the security settings required. Not sure I understand the question here though.

1 Like