The code is written in C#.
/*
* Created in SharpDevelop
* By Jeremy Anderson
*/
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Diagnostics;
using Microsoft.Win32;
namespace explorer_crash_fix{
/// <summary>
/// Binds itself to launch on startup, then detects for explorer.exe closed and restarts it if it is!
/// </summary>
public class crashCheck{
bool explorerOFF=false;
bool doCheckLoop=true;
public crashCheck(){
while(doCheckLoop==true){
Thread.Sleep(3000);
explorerOFF=true;
System.Diagnostics.Process[] runningProcesses = System.Diagnostics.Process.GetProcesses();
for(int i=0; i<runningProcesses.Length ; i++){
string processName = runningProcesses[i].ProcessName;
if(processName=="explorer"){
explorerOFF=false;
}
}
if(explorerOFF==true){
Process p=new Process();
p.StartInfo.FileName=@"C:\Windows\explorer.exe";
p.StartInfo.CreateNoWindow=true;
p.Start();
}
}
}
}
public class starter{
static void Main(){
crashCheck LOOKDICKS = new crashCheck();
}
}
}
I was too lazy to write a registry key addition function, so I just boud the program to system startup manually.