473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to restart Windows Explorer using Programme

Hi,

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

Thank you

Aug 3 '07 #1
3 8421

<ra********@gmail.comschrieb im Newsbeitrag
news:11**********************@e16g2000pri.googlegr oups.com...
Hi,

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

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.GetProcesses()){

try{
//compare it with "explorer "

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

}catch(Exception 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ü
ke*****@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."
Aug 3 '07 #2
Hi Kerem

Thank you for the reply.

This is exactly what I want & solved my problem.

Thank you.


Kerem Gümrükcü wrote:
<ra********@gmail.comschrieb im Newsbeitrag
news:11**********************@e16g2000pri.googlegr oups.com...
Hi,

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

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.GetProcesses()){

try{
//compare it with "explorer "

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

}catch(Exception 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ü
ke*****@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."
Aug 3 '07 #3

<ra********@gmail.comschrieb im Newsbeitrag
news:11**********************@i38g2000prf.googlegr oups.com...
Hi Kerem

Thank you for the reply.

This is exactly what I want & solved my problem.

Thank you.


Kerem Gümrükcü wrote:
<ra********@gmail.comschrieb im Newsbeitrag
news:11**********************@e16g2000pri.googlegr oups.com...
Hi,

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

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.GetProcesses()){

try{
//compare it with "explorer "

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

}catch(Exception 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ü
ke*****@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ü
ke*****@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."


Aug 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: J Bunton | last post by:
I have written a programme in VB (a 5 year old version) One of the things it does is to create new directories and files within them Problem:- The new directories and files are not displayed...
6
by: M. Faust | last post by:
Hi, after having installed F2PY-2.43.239_1806 I get the following error when trying to run the hello.f example from the /docs directory: f2py.py --fcompiler=compaqv -c -m hello hello.f...
1
by: Torsten Bronger | last post by:
Hallöchen! I've installed Python 2.3.5, IDLE 1.0.5 on a Win2k box and have fatal Windows errors with a trivial script. You can see a screenshot of the problem at...
2
by: Brian Worth | last post by:
I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0 was able to shut down or restart the (windows XP) machine using a series of API calls. (Getlasterror, GetCurrentProcess,...
6
by: Leonardo Curros | last post by:
Hello, I would like to know what's the best way to restart one service. I would like to do it from the service itself. Is this possible? I try it with ServiceController.stop()...
3
by: garyusenet | last post by:
Dear Professionals, I have recently been using the wonderful krypton toolkit and am trying to use them in my small hobby application. I include this bit of info as an aside really because i'm...
3
by: Mark | last post by:
Hello, What I need to know is if there is a better method to run/edit modules on my pc. I'm currently running the IDLE shell under Python 2.5, on Windows XP. Every time I edit my .txt or .py...
4
by: yxq | last post by:
Hello, I want to kill the Explorer process, after Explorer process has been killed, it will restart automatically immediately. How to disable it restart automatically? for example, in Windows Task...
1
by: labarnas | last post by:
Is there a way (as in ubuntu) to have windows xp to put all instances of internet explorer back as they were before windows update does a restart. We usually have 3 to 10 web pages displayed and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.