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. Visual Basic
  4. WMI, Win32_Process or Process class question with IE

WMI, Win32_Process or Process class question with IE

Scheduled Pinned Locked Moved Visual Basic
3 Posts 2 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.
  • T Offline
    T Offline
    TenmanS14
    wrote on last edited by
    #1

    just wondering if there's any way I can get the currectly active URL of IE using the process class or WMI?... Basically I want to be able to remotely shut down IE if a certain webpage is hit. I can get PID and name easily with the process class to put them in a datagrid, and then kill the process with WMI, just wondering how much more is possible.

    D 1 Reply Last reply
    0
    • T TenmanS14

      just wondering if there's any way I can get the currectly active URL of IE using the process class or WMI?... Basically I want to be able to remotely shut down IE if a certain webpage is hit. I can get PID and name easily with the process class to put them in a datagrid, and then kill the process with WMI, just wondering how much more is possible.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      No, you can't get it using WMI. You have to do this using the Shell.Application object. You can then get the open browser windows from the Windows property, then iterate through those to get the LocationName and LocationURL's. You'll need code running on each of the client machines you're monitoring because I don't think you can create the Shell.Application object on a remote server. The other problem is that this will only work for IE browser windows. It will NOT work if the user is using any other web browser.

      Dave Kreskowiak Microsoft MVP - Visual Basic

      T 1 Reply Last reply
      0
      • D Dave Kreskowiak

        No, you can't get it using WMI. You have to do this using the Shell.Application object. You can then get the open browser windows from the Windows property, then iterate through those to get the LocationName and LocationURL's. You'll need code running on each of the client machines you're monitoring because I don't think you can create the Shell.Application object on a remote server. The other problem is that this will only work for IE browser windows. It will NOT work if the user is using any other web browser.

        Dave Kreskowiak Microsoft MVP - Visual Basic

        T Offline
        T Offline
        TenmanS14
        wrote on last edited by
        #3

        Rats... was hoping to get away without having anything running on every machine... idea was to just have an old system sitting in my server room keeping an eye on things when required... I suppose it would be perfectly feasable for me to just have the client side bit of code as a very small app that can be run as a process (it won't have a GUI) when required on each client machine. programs already doing its main job which is killing MSN on certain computers when people take advantage of my relaxed nature so I don't have to block it for everyone. I could set up the firewall to block certain sites like myspace.com but again, I don't want to kill it for everyone, only the people who are abusing it, and as I'm using IPCop its a bit of a pain to turn it on and off.

        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