Shell.Application Question

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #44025
    Profile photo of Jacob Hudmon
    Jacob Hudmon
    Participant

    I am trying to run a series of commands within an active Internet Explorer window. I am wanting to copy textbox 1-2-3-4 to textbox 5-6-7-8. When I run:

    $ie = (New-Object -com "Shell.Application").Windows()

    and then type

    $ie

    I normally get a list of all open windows. If I open Internet Explorer and then navigate to a URL, the IE window shows in this list. When I open a URL bookmark from my desktop, it does not show the window when I run

    $ie

    . Does anyone have any idea why this is happening?

    #44703
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Unfortunately, Shell.Application is really old, deprecated, and not updated any longer. And PowerShell was never really intended for this kind of GUI control – which is why you're kind of forced to use that old COM object. But it is what it is; you've probably just run up against a situation where the COM object hasn't been updated to match the way Windows currently works (that COM object dates back to Windows 95).

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.