Windows 10: .bat file to restart explorer.exe sometimes fail

Discus and support .bat file to restart explorer.exe sometimes fail in Windows 10 Support to solve the problem; I have a .bat file with this line of code only without quotation. "taskkill /F /IM explorer.exe & start explorer" problem is 50% of time it will... Discussion in 'Windows 10 Support' started by m18xr2, Oct 28, 2020.

  1. m18xr2 Win User

    .bat file to restart explorer.exe sometimes fail


    I have a .bat file with this line of code only without quotation.

    "taskkill /F /IM explorer.exe & start explorer"

    problem is 50% of time it will work as intended, but other 50% it simply does not start explorer once task is killed. what is causing this and how can I change the code to fix this?

    I have an idea but unsure if it'll work, maybe taskkill on one line only, then another line to check if explorer is running, and lastly a line to run explorer.exe again but I'd have no idea what those line would look like. also I think it might be to do with SSD so fast that when its trying to run explorer.exe the previous task not killed off completely which preventing it from starting up might be the cause.

    pls help.

    :)
     
    m18xr2, Oct 28, 2020
    #1
  2. Craigg5 Win User

    Bat or Exe file to restart Computer Browser Service

    About 1 out of every 6 times I turn my laptop on I have to restart the computer browser service to be able to connect to networks. Is there a bat or exe file I can create that I can just click on and run to restart the service instead of having to go into
    the services/computer browser area to restart each time this happens? This is for windows 10. Thanks.
     
    Craigg5, Oct 28, 2020
    #2
  3. craigg Win User
    Bat or Exe file to restart Computer Browser Service

    About 1 out of every 6 times I turn my laptop on I have to restart the computer browser service to be able to connect to networks. Is there a bat or exe file I can create that I can just click on and run to restart the service instead of having to go into the services/computer browser area to restart each time this happens? Thanks.
     
    craigg, Oct 28, 2020
    #3
  4. .bat file to restart explorer.exe sometimes fail

    Cannot run an .exe file from .bat file in windows server 2016

    I can not run .exe file from a .bat file, .bat file is dynamically create file which contains path to the .exe file. I can see the log of .bat file it prints echo statements but when It comes to execute .exe file it just skip. when I run .exe file manually
    it runs perfectly. we are doing this through task scheduler.

    I would like to get some input what am I missing in the configuration.
     
    prashanthkumar2, Oct 28, 2020
    #4
Thema:

.bat file to restart explorer.exe sometimes fail

Loading...
  1. .bat file to restart explorer.exe sometimes fail - Similar Threads - bat file restart

  2. Bat file

    in Windows 10 Gaming
    Bat file: I have a bat fileI am improving it bit by bit till I have reached But not i have added a warning to it before a commandI now want to make that line font size Bigger than the others How can I do that ??So here is the Batch file content@ECHO OFF echo...
  3. Files Detected as Malware after comiling with bat-to-exe compilers

    in AntiVirus, Firewalls and System Security
    Files Detected as Malware after comiling with bat-to-exe compilers: hi, i made batch files, i used many types of BATCH-to-exe compiler. but after compiling them, Windows Defender detects them as Threats/Malwares/Trojans . is it problem with the app or is it false positive?...
  4. Convert Bat to exe?

    in Windows 10 Software and Apps
    Convert Bat to exe?: Is there a way to convert a batch file to exe but it is not detected as a trojan? Bat zu exe konvertieren?
  5. File Explorer Freezes Sometimes

    in Windows 10 Support
    File Explorer Freezes Sometimes: Hello,Yesterday (24-Jan-2020) installed update KB4534321.Today I noticed that sometimes windows file explorer freezes.Tried to close its window in the taskbar, once it worked, reopened, it was frozen. Rebooted computer, now it works.Does this update causing the trouble or...
  6. File explorer fails to run properly sometimes

    in Windows 10 Customization
    File explorer fails to run properly sometimes: Hello, Since about 5-7 months ago, when I was returning to do my work, my lock screen didn't respond at all. I had to force shut down my device to restart the whole laptop. Then, about a couple of weeks ago, it happened again while I had tabs open, and the Start and some...
  7. How to find out the list of commands for a .bat or .exe file?

    in Windows 10 Customization
    How to find out the list of commands for a .bat or .exe file?: hard to describe what im looking for i'll do my best to explain in details. example, an image software I use photo.exe when installed it automatically set up shell in registry for windows context menu for files type .bmp/.jpg etc etc. when viewed in registry/shell it show...
  8. Create exe files from bat files using native windows commands

    in Windows 10 Software and Apps
    Create exe files from bat files using native windows commands: Came across this hidden Windows gem I have never seen about converting bat to exe files. I know there are 3rd party apps but was unaware you could do it from Windows iExpress: Convert BAT-files into EXE-files [How-To] | Maintenance and System Tools | Windows Tools, Help...
  9. Bat or Exe file to restart Computer Browser Service

    in Windows 10 Support
    Bat or Exe file to restart Computer Browser Service: About 1 out of every 6 times I turn my laptop on I have to restart the computer browser service to be able to connect to networks. Is there a bat or exe file I can create that I can just click on and run to restart the service instead of having to go into the...
  10. Not able to launch certain .exe files with created .bat shortcuts

    in Windows 10 Support
    Not able to launch certain .exe files with created .bat shortcuts: Hello, To be able to use custom tiles on the Start Menu, I make .bat files of .exe files to use them as shortcuts to launch the .exe files. I make the .bat file by opening Notepad, pasting the directory path of the .exe file in quotes, and then save it as a .bat file. This...