How to install all .exe in a folder using a batch file?

前端 未结 1 1231
无人共我
无人共我 2021-01-29 01:29

I am trying to develop the following algorithm:

For all files in the current folder (folder containing the script) do: install the files one by one

cls
s         


        
1条回答
  •  离开以前
    2021-01-29 01:44

    This little batch file starts each .exe file in directory of the batch file as separate process. Batch processing is halted after starting an executable until the started application terminated itself.

    @echo off
    setlocal DisableDelayedExpansion
    for %%I in ("%~dp0*.exe") do (
        start "Running %%~nI" /wait "%%I"
    )
    endlocal
    

    For the details on the used commands, open a command prompt window and run there the following command lines to get displayed the help for each command:

    • for /?
    • start /?

    0 讨论(0)
提交回复
热议问题