Skip to Content
Technical Articles
Author's profile photo Stefan Schnell

VBScript is Not Longer Supported in IE11, Run VBScript from JavaScript

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) {

    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);"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.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.