Error:: Activex componet can not create object:"WScript.Shell"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike John

    #1

    Error:: Activex componet can not create object:"WScript.Shell"

    I am trying to use the shell object to send keys to the
    explorer browser to run the send page funcion.

    I am receiving the above error only when I put my html
    file in the web server folder.However if I am runing the
    file local it will work
    Any reason, why when the file is in the web server folder
    the create object failed to created the shell object.

    Systax:
    <html>
    <head>
    <body>
    <Form name = myform>
    <input type = button onclick = "Sendmy()" value
    = "Axiolog Email">
    </form>
    </body>
    </head>
    <script langauage = "Javascript ">
    function Sendmxy()
    {
    alert("ASDFSA")
    var wshell = WScript.CreateO bject("WScript. Shell")


    }

    </script>


    <SCRIPT Language=VBScri pt>

    Sub Sendmy()



    Dim WshShell
    dim intloop
    dim intCount
    dim intc
    Set WshShell = CreateObject("W Script.Shell")
    alert("Yes")

    WshShell.SendKe ys("%(T)")




    WshShell.SendKe ys("+(M)")

    WshShell.SendKe ys("+(M)")
    WshShell.SendKe ys("+(P)")



    End Sub

    </SCRIPT>


    </Html>


    sincerely yours


    Mike John
  • Steve C. Orr, MCSD

    #2
    Re: Error:: Activex componet can not create object:&quot;WS cript.Shell&quo t;

    Browser security settings may be hampering your attempts. To get it to
    work, the setting you'll most likely need to adjust can be found on the
    Internet Options dialog under the Tools dropdown menu in Internet Explorer.
    Go to the security tab. With local Intranet selected (assuming this is an
    intranet app), click the "Customize Level." button. Find the setting titled
    "Initialize and script ActiveX controls not marked as safe" and change the
    selection to either "enable" or "prompt."

    --
    I hope this helps,
    Steve C. Orr, MCSD



    "Mike John" <RiadeAsleh@hot mail.com> wrote in message
    news:0dff01c347 43$c9a41320$a00 1280a@phx.gbl.. .[color=blue]
    > I am trying to use the shell object to send keys to the
    > explorer browser to run the send page funcion.
    >
    > I am receiving the above error only when I put my html
    > file in the web server folder.However if I am runing the
    > file local it will work
    > Any reason, why when the file is in the web server folder
    > the create object failed to created the shell object.
    >
    > Systax:
    > <html>
    > <head>
    > <body>
    > <Form name = myform>
    > <input type = button onclick = "Sendmy()" value
    > = "Axiolog Email">
    > </form>
    > </body>
    > </head>
    > <script langauage = "Javascript ">
    > function Sendmxy()
    > {
    > alert("ASDFSA")
    > var wshell = WScript.CreateO bject("WScript. Shell")
    >
    >
    > }
    >
    > </script>
    >
    >
    > <SCRIPT Language=VBScri pt>
    >
    > Sub Sendmy()
    >
    >
    >
    > Dim WshShell
    > dim intloop
    > dim intCount
    > dim intc
    > Set WshShell = CreateObject("W Script.Shell")
    > alert("Yes")
    >
    > WshShell.SendKe ys("%(T)")
    >
    >
    >
    >
    > WshShell.SendKe ys("+(M)")
    >
    > WshShell.SendKe ys("+(M)")
    > WshShell.SendKe ys("+(P)")
    >
    >
    >
    > End Sub
    >
    > </SCRIPT>
    >
    >
    > </Html>
    >
    >
    > sincerely yours
    >
    >
    > Mike John[/color]


    Comment

    • CT

      #3
      Re: Error:: Activex componet can not create object:&quot;WS cript.Shell&quo t;

      I would assume that your problem has to do with permissions on the server.

      --
      Carsten Thomsen
      Enterprise Development with Visual Studio .NET, UML, and MSF

      "Mike John" <RiadeAsleh@hot mail.com> wrote in message
      news:0dff01c347 43$c9a41320$a00 1280a@phx.gbl.. .[color=blue]
      > I am trying to use the shell object to send keys to the
      > explorer browser to run the send page funcion.
      >
      > I am receiving the above error only when I put my html
      > file in the web server folder.However if I am runing the
      > file local it will work
      > Any reason, why when the file is in the web server folder
      > the create object failed to created the shell object.
      >
      > Systax:
      > <html>
      > <head>
      > <body>
      > <Form name = myform>
      > <input type = button onclick = "Sendmy()" value
      > = "Axiolog Email">
      > </form>
      > </body>
      > </head>
      > <script langauage = "Javascript ">
      > function Sendmxy()
      > {
      > alert("ASDFSA")
      > var wshell = WScript.CreateO bject("WScript. Shell")
      >
      >
      > }
      >
      > </script>
      >
      >
      > <SCRIPT Language=VBScri pt>
      >
      > Sub Sendmy()
      >
      >
      >
      > Dim WshShell
      > dim intloop
      > dim intCount
      > dim intc
      > Set WshShell = CreateObject("W Script.Shell")
      > alert("Yes")
      >
      > WshShell.SendKe ys("%(T)")
      >
      >
      >
      >
      > WshShell.SendKe ys("+(M)")
      >
      > WshShell.SendKe ys("+(M)")
      > WshShell.SendKe ys("+(P)")
      >
      >
      >
      > End Sub
      >
      > </SCRIPT>
      >
      >
      > </Html>
      >
      >
      > sincerely yours
      >
      >
      > Mike John[/color]


      Comment

      Working...