user1538402
user1538402

Reputation: 3

Keeping IE Open

I would like to create a Powershell script that will re-open IE each time it is closed.

Do {
$ie = New-Object -Com InternetExplorer.Application
$ie.Navigate(www.google.com)
$ie.Visible = $true
   }
While (?)  

I plan on using Start-Sleep to give the application time to fully open and so it doesn't keep spawning processes like mad, but I haven't been able to find out which value links to finding out if the window has been closed. Perhaps I'm going about this wrong.

Upvotes: 0

Views: 183

Answers (2)

marceljg
marceljg

Reputation: 1067

I have used the windows perfmon for this before. You use the Perfmon alerts to check countof ie instances running, and if they go below 1, start one.

It was many years ago and I have not used this recently.

Upvotes: 0

SpellingD
SpellingD

Reputation: 2621

for(){Start iexplore www.stackoverflow.com -wait}

Upvotes: 2

Related Questions