Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. internet explorer automation with msi

internet explorer automation with msi

Scheduled Pinned Locked Moved C#
testingtoolsquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asad Hussain
    wrote on last edited by
    #1

    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?

    H A 2 Replies Last reply
    0
    • A Asad Hussain

      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?

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      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 using GetObject in VB, or the Running Object Table (ROT) in other implementations; get its LocationURL property value; then call Quit. Do this until no more InternetExplorer instances are returned. When you're done upgrading the machine and no reboots are required (don't forget to check that, calling MsiGetMode to check for MSIRUNMODE_REBOOTATEND | MSIRUNMODE_REBOOTNOW), you should invoke iexplore.exe -nohome <url> for each URL in your list. Do not create new instances of InternetExplorer.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]

      1 Reply Last reply
      0
      • A Asad Hussain

        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?

        A Offline
        A Offline
        Alex Korchemniy
        wrote on last edited by
        #3

        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

        A 1 Reply Last reply
        0
        • A 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

          A Offline
          A Offline
          Asad Hussain
          wrote on last edited by
          #4

          gotcha... i'll look into it.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups