Hello community,

it seems that the time for VBScript is running out, you can find here an information in the Internet Explorer Dev Center about the deprecation of VBScript in the context of IE 11 in edge mode,

However, that is no reason to hang the ears.

Here a function in JavaScript to call a VBScript from IE 11 in edge mode:

function callVBS(scriptName) {

  //-Variables--------------------------------------------------------
    var wsh, pathName;

  if ("ActiveXObject" in window) {
    wsh = new ActiveXObject("WScript.Shell");
    if (typeof(wsh) == 'object') {
      pathName = location.pathname.substr(0, location.pathname.lastIndexOf("/"))+"/";
      pathName = pathName.slice(1);
      wsh.run("wscript.exe \"" + pathName + scriptName + ".vbs\"", 1, true);
      wsh = null;
    }
  }
  else {
    alert("Your Browser doesn't support ActiveXObject");
  }

}

 

In this case the VBScript file must be in the same directory as the JavaScript file.

On this way we do have still the possibility to use our good old VBScript a little bit longer.

And so it is possible to use VBScript in the context of UI5 development with IE 11.

Enjoy it.

Cheers
Stefan

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply