How to code a bat file to restart explorer and 2 programs


  1. Posts : 12
    Windows 7 Ultimate 32-bit
       #1

    How to code a bat file to restart explorer and 2 programs


    I am trying to write this program in notepad.exe.



    What am I doing wrong? The code stops after explorer.exe is restarted. I know this because the command prompt does not show the echo "-explorer restarted". When I look at the command prompt, the cursor seems to be on the next line, but without the normal C:\Users\JohnSmith> in front of it (there is nothing in front of the cursor).

    Also, if I include the command "exit" at the end of my .bat file, it doesn't seem to work. Even though if I type in exit into command prompt, the window closes.

    Please help.
      My Computer


  2. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
       #2

    Start Command


    I think that you may need to use the "start" command.

    Try these links:
    Batch Files - Start Multiple Programs At Once
    http://www.watchingthenet.com/window...s-at-once.html

    Last edited by lehnerus2000; 22 May 2012 at 09:38. Reason: Additional
      My Computer


  3. Posts : 3,371
    W10 Pro desktop, W11 laptop, W11 Pro tablet (all 64-bit)
       #3

    You need to use the Start command, without it the bat file processes lines serially so it will wait until the explorer.exe command has "completed" before executing the next line.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:18.
Find Us