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?

2 Likes

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.


https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/windows-scripting/d5fk67ky(v=vs.84)

1 Like