I just observed that when you execute a batch file in Windows XP, it is executed synchronously. All the programs are executed one-by-one with subsequent programs waiting for the previous ones to finish. So the behaviour you mentioned was not observed in Windows XP.
Windows 98 behaved differently. All GUI programs were started in a quick scan without waiting for the previous ones to finish and the batch file was also finished before these programs.
To handle this problem, you need to execute your programs using the START command. This command is used to start other programs and offers a /WAIT option which allows you to execute the command synchronously as you require. Fortunately START is supported by Windows XP and Windows 98 so you don't need to write different batch files for different platforms.
As a test, I just wrote a sample batch files with the following two lines.
[tt]
calc.exe
notepad.exe
[/tt]
On Windows XP, it started the Calculator. After closing the Calculator it started Notepad. After having done with the Notepad the batch file finished.
On Windows 98, both Calculator and Notepad started one after the other and the batch file finished immediately without any delay.
To make it work synchronously on Win98, I modified my batch file as under.
[tt]
start/wait calc.exe
start/wait notepad.exe
[/tt]
And this fixed it. Both on WinXP and Win98.
To learn more about START, type [tt]START/?[/tt] at the command prompt.