I am no expert on batch scripts on Windows. Also I am on windows 8.1 and don't have a copy of Windows XP around for testing.
It all sees to run fine, but for the replaygain scanning. What happens is that the playlist gets a few added entries:
...
Try to add the quotes around the whole argument, i.e.
start foobar2000.exe "/runcmd-playlist=d:\desktop\audio\"
By the way, the following variations of your script worked just fine for me, except that I used different paths for the audio files and the foobar2000 installation directory.
cd /d "c:\program files\foobar2000\"
start .\foobar2000.exe "/runcmd-files=replaygain/scan per-file track gain" "d:\desktop\audio\"
cd /d "c:\program files\foobar2000\"
start .\foobar2000.exe
.\foobar2000.exe "/runcmd=edit/clear"
.\foobar2000.exe /add "d:\desktop\audio\"
ping 1.0.0.0 -n 1 -w 3000 >NUL
.\foobar2000.exe "/runcmd-playlist=replaygain/scan per-file track gain"