Windows 10: Batch file does not wait for executed program to finish.

Discus and support Batch file does not wait for executed program to finish. in Windows 10 Gaming to solve the problem; Edition Windows 10 Pro Version 21H2 Installed on ‎8/‎3/‎2020 OS build 19044.1466 Experience Windows Feature Experience Pack 120.2212.3920.0 I have a... Discussion in 'Windows 10 Gaming' started by Kurt P Herzog, Jan 24, 2022.

  1. Batch file does not wait for executed program to finish.


    Edition Windows 10 Pro Version 21H2 Installed on ‎8/‎3/‎2020 OS build 19044.1466 Experience Windows Feature Experience Pack 120.2212.3920.0 I have a batch file that I want to start a browser, wait for it to close, then proceed to the next instruction in the batch. The batch file does not wait for the running program to finish. I have tried both variations shown below and the command line parameters all pass to the first? program. The batch file terminates without running the other programs.@echo off START "Cartoons" /WAIT "C:\Program Files x86\Microsoft\Edge\Application\msedge.exe" "ht

    :)
     
    Kurt P Herzog, Jan 24, 2022
    #1
  2. Kreij Win User

    need batch file help

    Do I sense a little of Therm's evil side? *Big Grin Batch file does not wait for executed program to finish. :D

    @Sol ...

    Doesn't the Call command delay batch execution until the executable returns ?
    No matter how long that is ? Or do you need to wait for a set period after the executable returns?

    This is how I thought it worked ...

    Start batch file
    Call program.exe
    Batch file stops and waits
    program.exe finishes
    Batch file continues again
     
    Kreij, Jan 24, 2022
    #2
  3. Batch file

    thank you for your reply. how to merge the codes so that the batch file does this

    the batch file displays the options below

    1. open the *.spl file in notepad
    2. delete the *.shd and *.spl files
    3.exit

    commands execute as options are selected
     
    Sandeep Bhugoo, Jan 24, 2022
    #3
  4. F.Wu Win User

    Batch file does not wait for executed program to finish.

    Unable to execute all commands in batch file

    Hi,

    I have a problem to execute batch file. There is an app running and monitoring UPS signal. If that signal goes true, the app will launch a batch file to close itself and then shutdown the PC after 30 seconds.

    the content of the batch file is like this:

    @Echo off

    app.exe -exit

    pause 30

    shutdown.exe /s /t 5

    However, it seems the system only executed the first two lines of commands
    app.exe, it closed the app, and did not shutdown the PC. If I run the batch file itself by double clicking the batch file, all commands are executed and PC shutdown properly.

    What is the problem and how to fix it? Thanks
     
Thema:

Batch file does not wait for executed program to finish.

Loading...
  1. Batch file does not wait for executed program to finish. - Similar Threads - Batch file does

  2. Batch file does not wait for executed program to finish.

    in Windows 10 Software and Apps
    Batch file does not wait for executed program to finish.: Edition Windows 10 Pro Version 21H2 Installed on ‎8/‎3/‎2020 OS build 19044.1466 Experience Windows Feature Experience Pack 120.2212.3920.0 I have a batch file that I want to start a browser, wait for it to close, then proceed to the next instruction in the batch. The batch...
  3. Batch file does not wait for executed program to finish.

    in Windows 10 Customization
    Batch file does not wait for executed program to finish.: Edition Windows 10 Pro Version 21H2 Installed on ‎8/‎3/‎2020 OS build 19044.1466 Experience Windows Feature Experience Pack 120.2212.3920.0 I have a batch file that I want to start a browser, wait for it to close, then proceed to the next instruction in the batch. The batch...
  4. Remote execution of specific batch file on network.

    in Windows 10 Network and Sharing
    Remote execution of specific batch file on network.: Hi, I am trying to setup a function on my home server in which ISOs can be created and burned over the network using the server pc's optical drives. I am using oscdimg and imgburn command prompt utilities for this. I have created a script that runs on the local PC, and based...
  5. Restart a specific program with a batch file

    in Windows 10 Ask Insider
    Restart a specific program with a batch file: I have to restart Windows Audio Device graph multiple times a day to the point that I just want to map a button on my stream deck to end the task. Is there a way to create a shortcut to end the task? I've tried taskkill /f /im audiodg.exe but that was unsuccessful. Any ideas?...
  6. Is there a program that executes commands at certain times (in a batch file)?

    in Windows 10 Customization
    Is there a program that executes commands at certain times (in a batch file)?: Hello, everyone, I have programmed a Minecraft server and have now set the computer to go on and off to certain pages. When it is on, the start file Per Autostart opens. But to close it I need the command /stop so the server saves. But because I want everything to be...
  7. please wait until the program is finished uninstalling or being changed (HELP)

    in Windows 10 Gaming
    please wait until the program is finished uninstalling or being changed (HELP): Hello, when I attempt to install or uninstall any programs i get this error message among others. I was uninstalling programs when this happened. I have restarted and done all I possibly can. I was told i have to force close MSIEXEC via task manager, however I can only access...
  8. Start a program from a batch file

    in Windows 10 Software and Apps
    Start a program from a batch file: I'm trying to create a batch file that should - call another batch file - start a program and then wait for the program to close - call another batch file My goal with this is to work around an issue in Windows 10 where the screensaver won't work when I have my game...
  9. Start a program from a batch file

    in Windows 10 Software and Apps
    Start a program from a batch file: 4 Apps of mine run a batch file that -tries- to call/start and EXE program. These Batch files need to work with OS XP thru Win 10. Win 10 has a pop-up window asking user if its okay to run/execute my EXE. No other Win version does this and thus I suspect a timing problem....
  10. Batch file start program minimized

    in Windows 10 Support
    Batch file start program minimized: Here's a little script to make a backup of 2 directories: Code: ::can't copy Opera data while Opera is running taskkill /im opera.exe robocopy c:\all e:\Bobback\All /mir robocopy c:\Users\Bob\AppData\Roaming e:\Bobback\Roaming /mir ::restart Opera minimized start...