How to restart Windows Explorer using Programme

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ramesh.nrk@gmail.com

    #1

    How to restart Windows Explorer using Programme

    Hi,

    I need to re-start the windows explorer programmaticall y. How can
    I restart Windows Explorer using programmaticall y?

    Thank you

  • Kerem Gümrükcü

    #2
    Re: How to restart Windows Explorer using Programme


    <ramesh.nrk@gma il.comschrieb im Newsbeitrag
    news:1186123742 .645560.119720@ e16g2000pri.goo glegroups.com.. .
    Hi,
    >
    I need to re-start the windows explorer programmaticall y. How can
    I restart Windows Explorer using programmaticall y?
    >
    Thank you
    >

    Hi Ramesh,

    this is a easy task: First enumerate all running processes on the system,
    then find all explorer processes and kill them all. Finally start a single
    explorer instance. Explorer restarted!


    Enumerate all processes and restart explorer:
    ------------------------

    foreach(Process p in Process.GetProc esses()){

    try{


    //compare it with "explorer "

    if(p.MainModule .ModuleName.Con tains("explorer ") == true)p.Kill();

    }catch(Exceptio n e){

    //do some exception handling here

    }

    //restart explorer

    Process.Start(" explorer.exe");

    }

    Thats it,...!


    Beste Grüsse / Best regards / Votre bien devoue

    Kerem Gümrükcü
    kerem.g@pro-it-education.de
    Pro-IT Education http://www.pro-it-education.de/
    Professional IT-Training and Consulting
    -----------------------
    "This reply is provided as is, without warranty express or implied."


    Comment

    • ramesh.nrk@gmail.com

      #3
      Re: How to restart Windows Explorer using Programme

      Hi Kerem

      Thank you for the reply.

      This is exactly what I want & solved my problem.

      Thank you.






      Kerem Gümrükcü wrote:
      <ramesh.nrk@gma il.comschrieb im Newsbeitrag
      news:1186123742 .645560.119720@ e16g2000pri.goo glegroups.com.. .
      Hi,

      I need to re-start the windows explorer programmaticall y. How can
      I restart Windows Explorer using programmaticall y?

      Thank you
      >
      >
      Hi Ramesh,
      >
      this is a easy task: First enumerate all running processes on the system,
      then find all explorer processes and kill them all. Finally start a single
      explorer instance. Explorer restarted!
      >
      >
      Enumerate all processes and restart explorer:
      ------------------------
      >
      foreach(Process p in Process.GetProc esses()){
      >
      try{
      >
      >
      //compare it with "explorer "
      >
      if(p.MainModule .ModuleName.Con tains("explorer ") == true)p.Kill();
      >
      }catch(Exceptio n e){
      >
      //do some exception handling here
      >
      }
      >
      //restart explorer
      >
      Process.Start(" explorer.exe");
      >
      }
      >
      Thats it,...!
      >
      >
      Beste Grüsse / Best regards / Votre bien devoue
      >
      Kerem Gümrükcü
      kerem.g@pro-it-education.de
      Pro-IT Education http://www.pro-it-education.de/
      Professional IT-Training and Consulting
      -----------------------
      "This reply is provided as is, without warranty express or implied."

      Comment

      • Kerem Gümrükcü

        #4
        Re: How to restart Windows Explorer using Programme


        <ramesh.nrk@gma il.comschrieb im Newsbeitrag
        news:1186134896 .312981.309250@ i38g2000prf.goo glegroups.com.. .
        Hi Kerem

        Thank you for the reply.

        This is exactly what I want & solved my problem.

        Thank you.






        Kerem Gümrükcü wrote:
        <ramesh.nrk@gma il.comschrieb im Newsbeitrag
        news:1186123742 .645560.119720@ e16g2000pri.goo glegroups.com.. .
        Hi,

        I need to re-start the windows explorer programmaticall y. How can
        I restart Windows Explorer using programmaticall y?

        Thank you
        >
        >
        Hi Ramesh,
        >
        this is a easy task: First enumerate all running processes on the system,
        then find all explorer processes and kill them all. Finally start a single
        explorer instance. Explorer restarted!
        >
        >
        Enumerate all processes and restart explorer:
        ------------------------
        >
        foreach(Process p in Process.GetProc esses()){
        >
        try{
        >
        >
        //compare it with "explorer "
        >
        if(p.MainModule .ModuleName.Con tains("explorer ") == true)p.Kill();
        >
        }catch(Exceptio n e){
        >
        //do some exception handling here
        >
        }
        >
        //restart explorer
        >
        Process.Start(" explorer.exe");
        >
        }
        >
        Thats it,...!
        >
        >
        Beste Grüsse / Best regards / Votre bien devoue
        >
        Kerem Gümrükcü
        kerem.g@pro-it-education.de
        Pro-IT Education http://www.pro-it-education.de/
        Professional IT-Training and Consulting
        -----------------------
        "This reply is provided as is, without warranty express or implied."



        You are welcome!


        Beste Grüsse / Best regards / Votre bien devoue

        Kerem Gümrükcü
        kerem.g@pro-it-education.de
        Pro-IT Education http://www.pro-it-education.de/
        Professional IT-Training and Consulting
        -----------------------
        "This reply is provided as is, without warranty express or implied."




        Comment

        Working...