So I am trying to get my application to delete itself on exit.
I am currently using this (found here):
Process.Start("cmd.exe",
"/C choice /C Y /N /D Y /T 3 & Del " + Application.ExecutablePath);
Application.Exit();
The CMD window comes up, but will not remove the application. Any ideas why not?
EDIT: So it works sometimes... other times it does not... ideas?