Tuesday 2 October 2018

windows 7 - Is there a way to kill explorer.exe and then run a batch file that starts it again?


Could this be done in batch or even in virtual basic?


taskkill /IM explorer.exe /t /f & start bat.bat

doesn't work.



Answer



Yes, you can do this in a batch file.


Just write them as if you are typing it in a commandprompt window.


So your bat.bat would look like this:


:: stop explorer and wait with executing the next bit
start "" "taskkill /IM explorer.exe /f" /wait

:: start it again
start "" explorer.exe /wait

:: is the same as REM btw. You can ommit it in your script.


If you want to restart your explorer, just run the bat.bat file.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...