I'm trying to make an updater in C# and I want to delete the updater once it's done.
So I have this code in C#:
var path = Environment.CurrentDirectory + "\\WindowsFormsApplication1.exe";
Process.Start("cmd.exe /c del " + path);
But I get this error message:
Win32Exception was unhandled
The system cannot find the file specified
But I'm sure the path is spelled right, so I don't think that's the problem.
Any ideas?