Hi All, I have 2 code , one a compile.exe and two is Wacther.exe. In compile.exe can use "process.start" and twin "Add/Remove" for using HKey.... In Watcher.exe a code use filesystemwatcher. My problem is, it can start a Watcher.exe but at the windows Load become error "The program Stop Working". somebody can give a real code. here a code; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Diagnostics; using Microsoft.Win32; namespace compile { public partial class Form1 : Form { public Form1() { InitializeComponent(); button1.Text = "Add"; button2.Text = "Remove"; button1.Enabled = true; button2.Enabled = true; } private void Form1_Load(object sender, EventArgs e) { try { using (Process myProcess = new Process()) { myProcess.StartInfo.UseShellExecute = false; myProcess.StartInfo.FileName = "C:\\Users\\family\\Desktop\\Watcher_.exe"; myProcess.StartInfo.CreateNoWindow = true; myProcess.Start(); } } catch (Exception) { Console.WriteLine(); } } private void button1_Click(object sender, EventArgs e) { RegistryKey key = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); key.SetValue("compile.exe", Application.ExecutablePath); button1.Enabled = false; } private void button2_Click(object sender, EventArgs e) { RegistryKey key = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); key.DeleteValue("compile.exe", false); button2.Enabled = false; } } } watcher code. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.IO; using System.IO.Compression; using System.Threading; using Microsoft.Win32; namespace Watcher_ { public partial class Form1 : Form { private string TargetPath = @"d:\test11\"; FileSystemWatcher watcher = new FileSystemWatcher(); List filesAdded = new List(); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { watcher.NotifyFilter = NotifyFilters.Attributes | NotifyFilters.CreationTime | NotifyFilters.DirectoryName | NotifyFilters.FileName | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Security | NotifyFilters.Size; string sOri = @"C:\"; watcher.Path = sOri; watcher.Created += OnCreated; watcher.IncludeSubdirectories = true; watcher.EnableRaisingEvents = true; } void OnCreated(object source, FileSystemEventArgs e) { System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false; filesAdded.Add(e.FullPath + e.Name); FileInfo fileInfo = new FileInfo(e.FullPath); string TargetFile = Path.Combine(TargetPath, fileInfo.Name); using (StreamWriter fileV = new System.IO.StreamWriter(fileInfo.Name)) { foreach (var sfile in filesAdded) { listBox1.Items.Add(sfile); fileV.WriteLine(sfile); } if (File.Exists(TargetFile)) { File.Delete(TargetFile); } } Thread.Sleep(1000); File.Move(fileInfo.Name, TargetFile); } } } Thank you.