internet explorer automation with msi
-
I wrote a plugin to internet explorer that requires internet explorer to be shutdown and restarted. I figured out a way to shut down IE using the MSI and to start it back up using VBScript. I was wondering if there was a way to remember what webpage each internet explorer process was on and then open up internet explorer windows that open up to the URLs that the user was visiting previously. Any insights?
-
I wrote a plugin to internet explorer that requires internet explorer to be shutdown and restarted. I figured out a way to shut down IE using the MSI and to start it back up using VBScript. I was wondering if there was a way to remember what webpage each internet explorer process was on and then open up internet explorer windows that open up to the URLs that the user was visiting previously. Any insights?
What does your question have to do with C#? Generally speaking, there is a way and you can do this in C#, but managed custom actions are not recommended because you have no control over runtime binding. Through script, VB (6.0), managed code, and even native COM client implementation you could keep getting an
InternetExplorer.Application
object usingGetObject
in VB, or the Running Object Table (ROT) in other implementations; get itsLocationURL
property value; then callQuit
. Do this until no moreInternetExplorer
instances are returned. When you're done upgrading the machine and no reboots are required (don't forget to check that, callingMsiGetMode
to check forMSIRUNMODE_REBOOTATEND | MSIRUNMODE_REBOOTNOW
), you should invoke iexplore.exe -nohome <url> for each URL in your list. Do not create new instances ofInternetExplorer.Application
, because successive calls after the first will most likely return the fist object and you'll just end up causing the last URL to be displayed only instead of all of them. I would warn against this, however. If one of those instances was the resultant page of an online purchase that haphazardly uses HTTP GET (that would be seriously bad and hopefully no one does that) and you browse to it on the users' behalf, you just ended up forcing them to buy another car or pair of socks or whatever. Just don't do it, IMO. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Customer Product-lifecycle Experience Microsoft [My Articles] [My Blog] -
I wrote a plugin to internet explorer that requires internet explorer to be shutdown and restarted. I figured out a way to shut down IE using the MSI and to start it back up using VBScript. I was wondering if there was a way to remember what webpage each internet explorer process was on and then open up internet explorer windows that open up to the URLs that the user was visiting previously. Any insights?
I agree with Heath. IMHO, you should let the user know that IE needs to be restarted. Let the user take care of opening their websites. Alex Korchemniy
-
I agree with Heath. IMHO, you should let the user know that IE needs to be restarted. Let the user take care of opening their websites. Alex Korchemniy
gotcha... i'll look into it.