You need to write bat, which will open the program, and after closing the program, delete its executable file and delete itself. Thank you in advance!

1 answer 1

The batch file 'MY_NAME.bat' runs 'FILE_NAME.exe':

@ECHO OFF start /wait FILE_NAME.exe :_del0 DEL /Q /F FILE_NAME.exe IF %ERRORLEVEL% LEQ 1 goto ok0 GOTO _del0 :ok0 :_del1 DEL /Q /F MY_NAME.bat IF %ERRORLEVEL% LEQ 1 goto ok1 GOTO _del1 :ok1