<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."