Hi, my prog is bellow,im using process.close() and process.kill()
but nmy process is not terminated,after executing the program onetime if change the code in prog it is giving compilation error like this:
unable to copy the file into process.exe becuse it is being used by another processs, then iam restarting the system after taht it is working ,plss tell me the sol
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "D:\\Program Files\\InterVideo\\WinDVR\\WinDvr.exe";
myProcess.StartInfo.UseShellExecute = false;
myProcess.Start();
myProcess.WaitForInputIdle(2000);
IntPtr hWnd = myProcess.MainWindowHandle;
//Console.WriteLine(hWnd);
SetForegroundWindow(hWnd);
myProcess.CloseMainWindow();
myProcess.Close();
myProcess.Kill();
}
[