Quantcast
Channel: Windows Server General Forum forum
Viewing all articles
Browse latest Browse all 24879

BAT file - cmd window will not close automatically after commands run

$
0
0

Hello everyone,

I am trying making a BAT file that will close a program and open the same program but a only its a different version...I have it working correctly but the only thing is wrong is that the CMD windowWILL NOT CLOSE AUTOMATICALLY...here is the script:

--------------------------------------------------------------------------

@echo off

:: end task

taskkill /im example.exe

::delete

IF EXIST "C:\Windows\System32\example.exe" del "C:\Windows\System32\example.exe"

\\MyPC\my files\example.exe

end

--------------------------------------------------------------------------------

Thanks for the help in advance! Cheers!




Viewing all articles
Browse latest Browse all 24879


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>