taskkill / f / im 自删除.exe
del 自删除.exe
del 1.bat
1 void main() 2 { 3 FILE *pf = fopen("1.bat", "w"); 4 fputs("taskkill /f /im 自删除.exe ", pf); 5 fputs("del 自删除.exe ", pf); 6 fputs("del 1.bat ", pf); 7 fclose(pf); 8 system("1.bat"); 9 system("pause"); 10 }