Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 674209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:40:50+00:00 2026-05-14T00:40:50+00:00

I am trying to design a windows-service which monitors a process namely Gtalk, if

  • 0

I am trying to design a windows-service which monitors a process namely “Gtalk”, if the process is started then, the browser Internet-explorer (process iexplore) should be closed. This should happen only when the process “Gtalk” is started, [not when running]

The code I have written and implemented, doesn’t allow to open IExplore when Gtalk is running. That is certainly what not I am trying for. The process Gtalk should close browser only at its start-up, After the process is started, it should allow to open IExplore.

Is it possible with Windows service or is it must be the part of Gtalk process itself?

This is my code:

 while (true)
          {

                if (Process.GetProcessesByName("Gtalk").Length > 0)
                {

                    foreach (Process prc in Process.GetProcessesByName("IExplore"))
                    {
                        prc.Kill();
                    }
                }
           }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:40:51+00:00Added an answer on May 14, 2026 at 12:40 am

    From what you’re saying (maybe I misread it), it’s only at startup of GTalk that this should kill IE, thereafter IE can be launched. Can multiple instances of GTalk be running?

    Do you control the GTalk code? Sounds like it would be best implemented in the GTalk startup procedure.

    If not then @peSHIr’s route of checking whether the GTalk process detected is one you’ve already seen might be your best bet.

    However even if only one instance of GTalk can run, you would need to break out of the code that does the IE kill once first run (maybe storing the GTalk process ID), then periodically check (maybe utilizing a timer) if the GTalk process is running and if not (or if it is but with a different proccess ID) you would run the IE kill code again

    Edit: simple example of Timer usage

    Note that this timer object is Disposable,
    Here’s a quick example;

    //in startup code...
    timer = new System.Threading.Timer(CheckProcessAndKillIeIfNeedBe, null, 0L, (long)TimeSpan.FromMinutes(1).TotalMilliseconds);
    
    //some method elsewhere
    public void CheckProccessAndKillIeIfNeedBe(object state)
    {
      //do the process check and kill IE if conditions are met          
    }
    

    null = state, 0L means run now, and the last parameter is your interval in milliseconds for how often this should run

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a windows service application which deals with storing values
I'm trying to design a Windows Forms application. By default, .NET had put Tahome
I've written a component in a Windows service (C#) which is responsible for sending
Hi I have to design a Windows Form which has a simple textbox. The
I'm trying to access the mssql database of my website which a web design
I am trying to design a windows form application. Now I have written an
I am trying to validate User Input in Windows Forms Application (using MVP design
I'm trying to implement IView for MVVM design pattern, which allows ViewModel to interact
My team is writing a windows service which needs to poll data from a
When I trying to use System.Windows.Form.Design namespace, I have to add reference all the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.