shell.application error "activex cant create object"

Discussion in 'ASP .Net' started by rami4tis, Sep 22, 2009.

  1. rami4tis

    rami4tis Guest

    hi

    Ive a little code that run without errors on .vbs file
    when i try to run this code on asp file ive got error :

    Microsoft VBScript runtime error '800a01ad'
    ActiveX component can't create object

    wht is the problem ?
    any ideas ?

    this is the code :

    Dim objApp
    Dim objWindows, objWindow
    Dim objIE

    Set objApp = CreateObject("shell.application")
    Set objWindows = objApp.Windows()
    For i=0 to objWindows.Count - 1
    Set objIEWnd = objWindows.Item(i)
    If objIEWnd.LocationURL = "http://www.url.com Then
    Set objIE = objIEWnd
    objIE.Navigate(otherurl)
    End If
    Next

    Set objIE = Nothing
    Set objWindow = Nothing
    set objWindows = Nothing
    Set objApp = Nothing

    thanks in advance ,
    poli
     
    rami4tis, Sep 22, 2009
    #1
    1. Advertising

  2. rami4tis

    Norman Yuan Guest

    You do know ASP (this NG is for ASP.NET, which is different from old ASP
    technology) runs at web server end, don't you?

    So, someone somehow gets brwoser running on the web server and you want to
    force the brower navigate away to other address. If the "someone" logs in to
    use the web server as his computer, he might be able to do this with your
    VBS script, but from ASP, no, it is server side service app, which cannot
    interract with desktop, where the browser window lives, not to mention the
    account used to run ASP with IIS is not allowed to create such risky object
    as Shell.

    "rami4tis" <> wrote in message
    news:...
    > hi
    >
    > Ive a little code that run without errors on .vbs file
    > when i try to run this code on asp file ive got error :
    >
    > Microsoft VBScript runtime error '800a01ad'
    > ActiveX component can't create object
    >
    > wht is the problem ?
    > any ideas ?
    >
    > this is the code :
    >
    > Dim objApp
    > Dim objWindows, objWindow
    > Dim objIE
    >
    > Set objApp = CreateObject("shell.application")
    > Set objWindows = objApp.Windows()
    > For i=0 to objWindows.Count - 1
    > Set objIEWnd = objWindows.Item(i)
    > If objIEWnd.LocationURL = "http://www.url.com Then
    > Set objIE = objIEWnd
    > objIE.Navigate(otherurl)
    > End If
    > Next
    >
    > Set objIE = Nothing
    > Set objWindow = Nothing
    > set objWindows = Nothing
    > Set objApp = Nothing
    >
    > thanks in advance ,
    > poli
     
    Norman Yuan, Sep 23, 2009
    #2
    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. Replies:
    2
    Views:
    5,840
    Jonathan Bromley
    Feb 18, 2005
  2. Rodney

    Activex Cant create object

    Rodney, Oct 14, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    511
    Rodney
    Oct 14, 2004
  3. Christian Heimes
    Replies:
    0
    Views:
    621
    Christian Heimes
    Feb 27, 2008
  4. Gerardo Herzig
    Replies:
    1
    Views:
    1,127
    Philipp Pagel
    Feb 27, 2008
  5. D'Arcy J.M. Cain
    Replies:
    0
    Views:
    887
    D'Arcy J.M. Cain
    Feb 27, 2008
Loading...

Share This Page