Wscript.shell works in javascript but not vbscript

My particular problem is with a WScript object with VBScript in HTA.

<script language="VBScript">
    Sub test()
       Set objShell = CreateObject("WScript.Shell") 
    End Sub
</script>

This works fine on my work computer (Windows 7 Enterprise), but not on my computer at home (Windows 8 home), and not on my mother computer (Windows 7 home).

BUT WAIT! MORE!

At first I thought that maybe there were no libraries there, but I checked out another program that I wrote that uses JavaScript and it has no problems. Tested javascript in my application and it works fine.

<script language="JavaScript">
    function javaTest()
    {
        objShell = new ActiveXObject("WScript.Shell");
    }
</script>

This is a mistake that I get all the time.

ERROR: provider not found. It may not be installed correctly.

64 32 , , . , JavaScript, VBScript. , , , McDouble . , , : " . JavaScript"

+5
1

, , ActiveX . , :

  • " "...
  • "".
  • -. ( , -)
  • " "...
  • ActiveX ( )
  • ActiveX "" ""
+2

All Articles