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. Detecting instances of Internet Explorer for all users logged in

Detecting instances of Internet Explorer for all users logged in

Scheduled Pinned Locked Moved C#
csharpcomhelpquestion
10 Posts 5 Posters 2 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.
  • I Offline
    I Offline
    Ihtesham 0
    wrote on last edited by
    #1

    Hi, i have a windows service which is executing EnumWindowCallBack as shown in the following link Capturing the Running IE Instances in C#[^] The service is running as LocalSystem account and is interacting with Desktop. The service is writing all URLS opened by me in a text file. It is working fine for me BUT when i switch as a different XP user, and open any IE window, The service can not detect this new IE window. My aim is to get running instances of IE for all users logged in. Can some one help. I can send the code if any body is willing to help me. Please help me :confused:

    S A realJSOPR 3 Replies Last reply
    0
    • I Ihtesham 0

      Hi, i have a windows service which is executing EnumWindowCallBack as shown in the following link Capturing the Running IE Instances in C#[^] The service is running as LocalSystem account and is interacting with Desktop. The service is writing all URLS opened by me in a text file. It is working fine for me BUT when i switch as a different XP user, and open any IE window, The service can not detect this new IE window. My aim is to get running instances of IE for all users logged in. Can some one help. I can send the code if any body is willing to help me. Please help me :confused:

      S Offline
      S Offline
      ScottM1
      wrote on last edited by
      #2

      Are you sure that the service is running when you log in as another user? If the service is running under the LocalSystem account it does not make sense that it would only work for your user account.

      I 1 Reply Last reply
      0
      • I Ihtesham 0

        Hi, i have a windows service which is executing EnumWindowCallBack as shown in the following link Capturing the Running IE Instances in C#[^] The service is running as LocalSystem account and is interacting with Desktop. The service is writing all URLS opened by me in a text file. It is working fine for me BUT when i switch as a different XP user, and open any IE window, The service can not detect this new IE window. My aim is to get running instances of IE for all users logged in. Can some one help. I can send the code if any body is willing to help me. Please help me :confused:

        A Offline
        A Offline
        Andre Gardiner
        wrote on last edited by
        #3

        My guest, your program or the service the program depend upon is running inactive or a mode that is blocked by windows log in user security service. You could try if the program will work on both administrative users. ;)

        Sir.Dre

        I 1 Reply Last reply
        0
        • S ScottM1

          Are you sure that the service is running when you log in as another user? If the service is running under the LocalSystem account it does not make sense that it would only work for your user account.

          I Offline
          I Offline
          Ihtesham 0
          wrote on last edited by
          #4

          Hi Scott Yes when i switch as another user (xp limited user), the service is still running. I cannot stop it ie. Access is denied. But when i open an internet explorer window, my service can not detect it and the log is still showing the same number of windows as opened by the admin user. I want this service to detect all windows for all users. Thanks

          S 1 Reply Last reply
          0
          • A Andre Gardiner

            My guest, your program or the service the program depend upon is running inactive or a mode that is blocked by windows log in user security service. You could try if the program will work on both administrative users. ;)

            Sir.Dre

            I Offline
            I Offline
            Ihtesham 0
            wrote on last edited by
            #5

            Hi SirDre If i make everyone an admin user, then they can kill my process, which i dont want. Actually this is a parental control system. Only the parents should be able to stop the service not the children. Thanks.

            D 1 Reply Last reply
            0
            • I Ihtesham 0

              Hi Scott Yes when i switch as another user (xp limited user), the service is still running. I cannot stop it ie. Access is denied. But when i open an internet explorer window, my service can not detect it and the log is still showing the same number of windows as opened by the admin user. I want this service to detect all windows for all users. Thanks

              S Offline
              S Offline
              ScottM1
              wrote on last edited by
              #6

              I looked it up and it seems that an interactive service can only interact with 1 user desktop. You will probably have to find another way of doing this.

              1 Reply Last reply
              0
              • I Ihtesham 0

                Hi, i have a windows service which is executing EnumWindowCallBack as shown in the following link Capturing the Running IE Instances in C#[^] The service is running as LocalSystem account and is interacting with Desktop. The service is writing all URLS opened by me in a text file. It is working fine for me BUT when i switch as a different XP user, and open any IE window, The service can not detect this new IE window. My aim is to get running instances of IE for all users logged in. Can some one help. I can send the code if any body is willing to help me. Please help me :confused:

                realJSOPR Offline
                realJSOPR Offline
                realJSOP
                wrote on last edited by
                #7

                Only one user can be logged in at a time, so the service can only work for the currently logged on user. Maybe you have to reset something when a user logon event is detected.

                .45 ACP - because shooting twice is just silly
                -----
                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                1 Reply Last reply
                0
                • I Ihtesham 0

                  Hi SirDre If i make everyone an admin user, then they can kill my process, which i dont want. Actually this is a parental control system. Only the parents should be able to stop the service not the children. Thanks.

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

                  Ihtesham wrote:

                  Actually this is a parental control system.

                  OK, what are you trying to control with this? Are you trying to prevent IE from running? Log all the URL's that are in each IE window? What? From what I'm assuming you're doing so far, you're going about it the wrong way. But, I'll leave confirming that up to you before I way anything.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007, 2008
                  But no longer in 2009...

                  I 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    Ihtesham wrote:

                    Actually this is a parental control system.

                    OK, what are you trying to control with this? Are you trying to prevent IE from running? Log all the URL's that are in each IE window? What? From what I'm assuming you're doing so far, you're going about it the wrong way. But, I'll leave confirming that up to you before I way anything.

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                         2006, 2007, 2008
                    But no longer in 2009...

                    I Offline
                    I Offline
                    Ihtesham 0
                    wrote on last edited by
                    #9

                    Hello Dave.. Basically parental control system is a service (PCS.exe) which will run under LocalSystem account and interacting with desktop. When other users (children) log in to the computer as limited users, PCS will do the following jobs: 1. Key logging -- already implemented 2. Screenshots logging -- 3. Restrict some applications -- for example sol.exe or calc.exe. My Service read these program names from xml file and will kill the process if found open. System.Diagnostic.Process works very well here. 4. Restrict websites -- This is giving me hard time. Basically my service can find internet explorer windows and URLS being visited very well in current user session. But when i switch the user, the service cannot see any explorer window. PROBLEM: The main problem right now is. If PCS.exe is running under local system account, if i want to kill a process for user A, it says Access Denied. If i run PCS.exe under user account A, it cannot interact with desktop. How can i make it able to kill a process for not only current user but also for any other user who is logged in. I hope i have explained what i am doing or wish to do.

                    D 1 Reply Last reply
                    0
                    • I Ihtesham 0

                      Hello Dave.. Basically parental control system is a service (PCS.exe) which will run under LocalSystem account and interacting with desktop. When other users (children) log in to the computer as limited users, PCS will do the following jobs: 1. Key logging -- already implemented 2. Screenshots logging -- 3. Restrict some applications -- for example sol.exe or calc.exe. My Service read these program names from xml file and will kill the process if found open. System.Diagnostic.Process works very well here. 4. Restrict websites -- This is giving me hard time. Basically my service can find internet explorer windows and URLS being visited very well in current user session. But when i switch the user, the service cannot see any explorer window. PROBLEM: The main problem right now is. If PCS.exe is running under local system account, if i want to kill a process for user A, it says Access Denied. If i run PCS.exe under user account A, it cannot interact with desktop. How can i make it able to kill a process for not only current user but also for any other user who is logged in. I hope i have explained what i am doing or wish to do.

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

                      Ihtesham wrote:

                      4. Restrict websites -- This is giving me hard time. Basically my service can find internet explorer windows and URLS being visited very well in current user session. But when i switch the user, the service cannot see any explorer window.

                      That's because this better handled by a proxy or firewall. You don't need to delve into every single users session to find every IE browser window. Besides, youre technique will only work with IE. It will not work with any other browser.

                      Ihtesham wrote:

                      3. Restrict some applications -- for example sol.exe or calc.exe. My Service read these program names from xml file and will kill the process if found open. System.Diagnostic.Process works very well here.

                      Better handled by Group Policy.

                      Ihtesham wrote:

                      2. Screenshots logging --

                      Useless. You can take snapshots all day long and still miss what you need to see.

                      Ihtesham wrote:

                      1. Key logging -- already implemented

                      And illegal is the U.S if used on people who are not your kids.

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                           2006, 2007, 2008
                      But no longer in 2009...

                      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