How would I create a batch file that does the following: Open program A Open program B Waits till program B is closed by the user and then closes program A Exits Neither program is a native windows program.
To my knowledge you cannot do that in a batch file. Your probably going to have to use vbscript or something similar.
This is what I use for autoinstalling some things on first run of XP Code: @echo off title Windows AutoInstaller ECHO. ECHO Over the next few minutes you will see automated installations ECHO of various sofware applications, windows updates, and registry ECHO tweaks being implemented. The computer will restart automatically ECHO once the whole process has finished! ECHO ECHO Installing Windows Installer ECHO Please wait... start /wait %systemdrive%\install\WindowsXP-KB942288-v3-x86.exe /passive /norestart ECHO ECHO Installing .NET Framework v1.1 SP1 ECHO Please wait... start /wait %systemdrive%\install\0_dotNET11SP1.exe /ai ECHO ECHO Installing .NET Framework v3.5 ECHO Please wait... start /wait %systemdrive%\install\dotnetfx35\wcu\dotNetFramework\dotNetFx35setup.exe /q:a /c:"setup.exe /q /norestart" /norestart ECHO ECHO Installing Windows Components ECHO Please wait... start /wait %windir%\system32\sysocmgr.exe /i:%windir%\inf\sysoc.inf /u:%systemdrive%\install\sysoc.inf /r /q echo. pause exit