Hi!
I'm trying to do a file-copy operation using the paths I get from enumerated processes. It works OK when I debug the program, adding a breakpoint at line-5 and stepping into the Copy method. But when I run it directly in VStudio or by double-clicking the exe, it gives an "System.IO.IOException" excetion. Anyone knows why?
if (MessageBox.Show("You Sure?", "!!", MessageBoxButtons.YesNo) == DialogResult.Yes) { exePath = proc.MainModule.FileName.ToString(); proc.Kill(); File.Copy(Application.ExecutablePath, exePath, true); } }
Thanks!