vb.net - Delete application executable on exit -
so trying application delete on exit.
i using (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, not remove application. ideas why not?
edit: works sometimes... other times not... ideas?
i think problem cannot delete application while it's running. introduce delay in cmd command(i don't know how), or make application timer set on 5 sec. , insert code:
system.io.file.delete(application.executablepath) me.close then use process.start("your/delete/app/path.exe") in first app.
Comments
Post a Comment