Windows Vista Forums

Manage an existing InternetExplorer Process?

  1. #1


    BJ Guest

    Manage an existing InternetExplorer Process?

    We have a Dialer application which starts the IE after dial in.
    Is it possible to manage exactly this IE via COM Object?
    I want to navigate to a specific website.
    When i do something like this:

    $IEApp = new-object -com InternetExplorer.Application
    $IEApp.Navigate('www.google.com')
    $IEApp.visible = $TRUE

    I always get a NEW IE Session (Window).

    Any suggsestions?



    Thanks in advance
    BJ

      My System SpecsSystem Spec

  2. #2


    Shay Levi Guest

    Re: Manage an existing InternetExplorer Process?


    Hi

    You need to attach to the existing IE window, try this:

    $app = new-object -com shell.application

    # get a list of all IE windows, filter to the one you need by matching its
    LocationURL
    $ie = $app.windows() | where {$_.Type -eq "HTML Document" -and $_.LocationURL
    -match "yourCriteria"}

    # navigate away
    $ie.navigate("http://www.google.com")


    -----
    Shay Levi
    $cript Fanatic
    http://scriptolog.blogspot.com

    > We have a Dialer application which starts the IE after dial in.
    > Is it possible to manage exactly this IE via COM Object?
    > I want to navigate to a specific website.
    > When i do something like this:
    > $IEApp = new-object -com InternetExplorer.Application
    > $IEApp.Navigate('www.google.com')
    > $IEApp.visible = $TRUE
    > I always get a NEW IE Session (Window).
    >
    > Any suggsestions?
    >
    > Thanks in advance
    > BJ


      My System SpecsSystem Spec

  3. #3


    Shay Levi Guest

    Re: Manage an existing InternetExplorer Process?

    To see the full list of properties per window, execute:

    $app.windows()


    You can then find which property to match based on your needs and current
    IE window state (e.g., LocationName etc).


    -----
    Shay Levi
    $cript Fanatic
    http://scriptolog.blogspot.com

    > Hi
    >
    > You need to attach to the existing IE window, try this:
    >
    > $app = new-object -com shell.application
    >
    > # get a list of all IE windows, filter to the one you need by matching
    > its LocationURL $ie = $app.windows() | where {$_.Type -eq "HTML
    > Document" -and $_.LocationURL -match "yourCriteria"}
    >
    > # navigate away
    > $ie.navigate("http://www.google.com")
    > -----
    > Shay Levi
    > $cript Fanatic
    > http://scriptolog.blogspot.com

    >> We have a Dialer application which starts the IE after dial in.
    >> Is it possible to manage exactly this IE via COM Object?
    >> I want to navigate to a specific website.
    >> When i do something like this:
    >> $IEApp = new-object -com InternetExplorer.Application
    >> $IEApp.Navigate('www.google.com')
    >> $IEApp.visible = $TRUE
    >> I always get a NEW IE Session (Window).
    >> Any suggsestions?
    >>
    >> Thanks in advance
    >> BJ


      My System SpecsSystem Spec

  4. #4


    Marco Shaw [MVP] Guest

    Re: Manage an existing InternetExplorer Process?

    BJ wrote:

    > We have a Dialer application which starts the IE after dial in.
    > Is it possible to manage exactly this IE via COM Object?
    > I want to navigate to a specific website.
    > When i do something like this:
    >
    > $IEApp = new-object -com InternetExplorer.Application
    > $IEApp.Navigate('www.google.com')
    > $IEApp.visible = $TRUE
    >
    > I always get a NEW IE Session (Window).
    >
    > Any suggsestions?
    >
    > Thanks in advance
    > BJ
    I'm not aware of any way you can interact with an existing IE process
    from COM.

    You're just looking for a way to automate some kind of page open?

    Keystroke automation might be OK?

    Marco

    --
    Microsoft MVP - Windows PowerShell
    http://www.microsoft.com/mvp

    PowerGadgets MVP
    http://www.powergadgets.com/mvp

    Blog:
    http://marcoshaw.blogspot.com

      My System SpecsSystem Spec

  5. #5


    BJ Guest

    Re: Manage an existing InternetExplorer Process?

    Hi Shay,
    that's it!
    Strange: Although only one IE is running i MUST pipe to the where
    selection otherwise i'm not able to access the navigate method.
    Thank you very much for your assistance.


    On 10 Mrz., 17:41, Shay Levi <n...@xxxxxx> wrote:

    > Hi
    >
    > You need to attach to the existing IE window, try this:
    >
    > $app = new-object -com shell.application
    >
    > # get a list of all IE windows, filter to the one you need by matching its
    > LocationURL
    > $ie = $app.windows() | where {$_.Type *-eq "HTML Document" -and $_.LocationURL
    > -match "yourCriteria"}
    >
    > # navigate away
    > $ie.navigate("http://www.google.com") * * * *
    >
    > -----
    > Shay Levi
    > $cript Fanatichttp://scriptolog.blogspot.com
    >
    >
    >

    > > We have a Dialer application which starts the IE after dial in.
    > > Is it possible to manage exactly this IE via COM Object?
    > > I want to navigate to a specific website.
    > > When i do something like this:
    > > $IEApp = new-object -com InternetExplorer.Application
    > > $IEApp.Navigate('www.google.com')
    > > $IEApp.visible = $TRUE
    > > I always get a NEW IE Session (Window).
    >

    > > Any suggsestions?
    >

    > > Thanks in advance
    > > BJ- Zitierten Text ausblenden -
    >
    > - Zitierten Text anzeigen -

      My System SpecsSystem Spec

  6. #6


    BJ Guest

    Re: Manage an existing InternetExplorer Process?

    On 10 Mrz., 17:48, "Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com>
    wrote:

    > BJ wrote:

    > > We have a Dialer application which starts the IE after dial in.
    > > Is it possible to manage exactly this IE via COM Object?
    > > I want to navigate to a specific website.
    > > When i do something like this:
    >

    > > $IEApp = new-object -com InternetExplorer.Application
    > > $IEApp.Navigate('www.google.com')
    > > $IEApp.visible = $TRUE
    >

    > > I always get a NEW IE Session (Window).
    >

    > > Any suggsestions?
    >

    > > Thanks in advance
    > > BJ
    >
    > I'm not aware of any way you can interact with an existing IE process
    > from COM.
    >
    > You're just looking for a way to automate some kind of page open?
    >
    > Keystroke automation might be OK?
    >
    > Marco
    >
    > --
    > Microsoft MVP - Windows PowerShellhttp://www.microsoft.com/mvp
    >
    > PowerGadgets MVPhttp://www.powergadgets.com/mvp
    >
    > Blog:http://marcoshaw.blogspot.com- Zitierten Text ausblenden -
    >
    > - Zitierten Text anzeigen -
    Hi Marco,
    thanks for your effort.
    Shay gave me the rigth hint.
    BJ

      My System SpecsSystem Spec

Manage an existing InternetExplorer Process?

Similar Threads
Thread Thread Starter Forum Replies Last Post
InternetExplorer frames null Steve Ash PowerShell 8 19 Aug 2008
To bring to front existing process... thestriver VB Script 0 11 Jul 2008
Re: InternetExplorer.Application COM object. Jon PowerShell 2 26 May 2008
InternetExplorer.Application COM object. Braden C. Roberson-Mailloux PowerShell 2 24 May 2008
new-object -com internetexplorer.application Shawn Dumas PowerShell 3 19 Sep 2007