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

Discussion in 'ASP .Net' started by Mike John, Jul 11, 2003.

  1. Mike John

    Mike John Guest

    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.CreateObject("WScript.Shell")


    }

    </script>


    <SCRIPT Language=VBScript>

    Sub Sendmy()



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

    WshShell.SendKeys("%(T)")




    WshShell.SendKeys("+(M)")

    WshShell.SendKeys("+(M)")
    WshShell.SendKeys("+(P)")



    End Sub

    </SCRIPT>


    </Html>


    sincerely yours


    Mike John
    Mike John, Jul 11, 2003
    #1
    1. Advertising

  2. 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
    http://Steve.Orr.net


    "Mike John" <> wrote in message
    news:0dff01c34743$c9a41320$...
    > 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.CreateObject("WScript.Shell")
    >
    >
    > }
    >
    > </script>
    >
    >
    > <SCRIPT Language=VBScript>
    >
    > Sub Sendmy()
    >
    >
    >
    > Dim WshShell
    > dim intloop
    > dim intCount
    > dim intc
    > Set WshShell = CreateObject("WScript.Shell")
    > alert("Yes")
    >
    > WshShell.SendKeys("%(T)")
    >
    >
    >
    >
    > WshShell.SendKeys("+(M)")
    >
    > WshShell.SendKeys("+(M)")
    > WshShell.SendKeys("+(P)")
    >
    >
    >
    > End Sub
    >
    > </SCRIPT>
    >
    >
    > </Html>
    >
    >
    > sincerely yours
    >
    >
    > Mike John
    Steve C. Orr, MCSD, Jul 11, 2003
    #2
    1. Advertising

  3. Mike John

    CT Guest

    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
    http://www.apress.com/book/bookDisplay.html?bID=105
    "Mike John" <> wrote in message
    news:0dff01c34743$c9a41320$...
    > 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.CreateObject("WScript.Shell")
    >
    >
    > }
    >
    > </script>
    >
    >
    > <SCRIPT Language=VBScript>
    >
    > Sub Sendmy()
    >
    >
    >
    > Dim WshShell
    > dim intloop
    > dim intCount
    > dim intc
    > Set WshShell = CreateObject("WScript.Shell")
    > alert("Yes")
    >
    > WshShell.SendKeys("%(T)")
    >
    >
    >
    >
    > WshShell.SendKeys("+(M)")
    >
    > WshShell.SendKeys("+(M)")
    > WshShell.SendKeys("+(P)")
    >
    >
    >
    > End Sub
    >
    > </SCRIPT>
    >
    >
    > </Html>
    >
    >
    > sincerely yours
    >
    >
    > Mike John
    CT, Jul 11, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kyle

    WScript.Shell Run Error

    Kyle, Jan 19, 2004, in forum: ASP General
    Replies:
    0
    Views:
    973
  2. Guoqi Zheng
    Replies:
    0
    Views:
    375
    Guoqi Zheng
    Jan 25, 2004
  3. joe

    Help with WScript.Shell Object

    joe, May 7, 2005, in forum: ASP General
    Replies:
    4
    Views:
    216
    Mark J. McGinty
    May 8, 2005
  4. ferg

    wscript.shell error

    ferg, May 10, 2006, in forum: ASP General
    Replies:
    6
    Views:
    220
  5. .nLL
    Replies:
    3
    Views:
    739
Loading...

Share This Page