doodledump
Programmer
- Sep 4, 2024
- 7
I'm trying to create a batch script that requires running two programs, one after the other. I've tried using wait to make the script run in sequence but it plows through the first wait and only stops at the second. This is the problem section:
::Uninstalls old build
@echo Uninstalling previous build...
start "Build Uninstall" /d "path" /WAIT program
@echo Uninstalled build
::Installs newest build
@echo Installing new build...
for /f %%f in ('dir path /O: D/T:W /B ') do @set "file=%%f"
@echo Newest build: %file%
start "Build Install" /d "path" /WAIT %file%
@echo Build installed
Any advice is appreciated, I'm working on a Windows Server 2019 Standard
::Uninstalls old build
@echo Uninstalling previous build...
start "Build Uninstall" /d "path" /WAIT program
@echo Uninstalled build
::Installs newest build
@echo Installing new build...
for /f %%f in ('dir path /O: D/T:W /B ') do @set "file=%%f"
@echo Newest build: %file%
start "Build Install" /d "path" /WAIT %file%
@echo Build installed
Any advice is appreciated, I'm working on a Windows Server 2019 Standard