Before I get comments saying this is a duplicate, I looked, found similar questions but their respective answers didn't work for me.
I currently have a simple batch script to refresh explorer.exe (related to this question) and have exit
at the end. The script works but the command window doesn't close. Looking at other questions, people had suggested using exit/b
. Tried that as well and it had the same affect as the former.
My full code can be found in the link above but I will also post here.
@echo off
cls
taskkill /f /im explorer.exe >nul
timeout 1 /nobreak >nul
explorer.exe
exit