![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | InternetExplorer.Application COM object. I'm new to COM development. new-variable html $a = ([xml](new-object net.webclient).downloadstring("http://blogs.msdn.com/powershell/rss.aspx")).rss.channel.item $oIE = new-object -COM InternetExplorer.Application $oIE.navigate2(about:blank) $oIE.statusbar=$True $oIE.addressbar=$False $oIE.menubar=$False $oIE.toolbar=$False $b = $a | select $link,title,pubdate | convertto-html | % {$_.replace("<","<").replace(">",">")} $oIE.document.body.insertAdjacentHTML $oIE.visible=$True I'm trying to spawn an IE window whenever powershell starts. This windows will display the above rss feeds as links. The script isn't crashing, however the windows which spawns contains no data. I'm using IE 7 and Powershell v1. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: InternetExplorer.Application COM object. Hi Braden, Try this, if you want it to be poped up each time PowerShell loads, wrap it in a function, put it in your profile and add a call to the function: ### $profile ### function get-rss{ $a = ([xml](new-object net.webclient).downloadstring("http://blogs.msdn.com/powershell/rss.aspx")).rss.channel.item $oIE = new-object -com internetExplorer.application $oIE.navigate2("about:blank") $oIE.statusbar=$true $oIE.addressbar=$false $oIE.menubar=$false $oIE.toolbar=$false $link = @{n="Title";e={"<a href='$($_.link)'>$($_.title)</a>"}} $b = $a | select $link,pubdate | convertto-html | foreach {$_.replace("<","<").replace(">",">")} $oIE.document.body.innerHTML = $b $oIE.visible=$true } get-rss ######## --- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Quote: > I'm new to COM development. > > new-variable html > $a = ([xml](new-object > net.webclient).downloadstring("http://blogs.msdn.com/powershell/rss.as > px")).rss.channel.item > $oIE = new-object -COM InternetExplorer.Application > $oIE.navigate2(about:blank) > $oIE.statusbar=$True > $oIE.addressbar=$False > $oIE.menubar=$False > $oIE.toolbar=$False > $b = $a | select $link,title,pubdate | convertto-html | % > {$_.replace("<","<").replace(">",">")} > $oIE.document.body.insertAdjacentHTML > $oIE.visible=$True > I'm trying to spawn an IE window whenever powershell starts. This > windows will display the above rss feeds as links. The script isn't > crashing, however the windows which spawns contains no data. I'm using > IE 7 and Powershell v1. > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: InternetExplorer.Application COM object. "Lionel Fourquaux" <use.reply-to@xxxxxx-spam.invalid> wrote in message news:slrng3guda.al6.use.reply-to@xxxxxx Quote: > Which version of Windows are you testing this on? Does it work if you > disable IE Protected Mode (on Vista)? > > IE 7 on Vista will create a new process (with a restricted token) for > Protected Mode, which will break some COM relationships. This appears > to be fixed in IE 8 beta 1. I never was able to figure that out. Ironically, I upgraded to IE8 Beta 1 and started running it in IE7 compatibility mode before I got my IE scripts (PowerShell and WSH) working again. It now works well enough - I was able to export a few hundred messages from a Sakai web system for someone via PowerShell-based IE automation. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| InternetExplorer Com Object Find Utility | PowerShell | |||
| Give focus to an InternetExplorer.Application object | VB Script | |||
| Re: InternetExplorer.Application COM object. | PowerShell | |||
| REQ: internetexplorer com object and access to array of links | PowerShell | |||
| new-object -com internetexplorer.application | PowerShell | |||