What I tried:
function getCurrentPath(){
var fso = new ActiveXObject("Scripting.FileSystemObject");
return fso.GetFolder(".").Path;
}
This code is in a HTML file. Now I want to get the folder path the HTML is in.
But it always return the desktop path.
You can do this with the following code:
var fso = new ActiveXObject("scripting.FileSystemObject");
return fso.GetAbsolutePathName(".");