You probably meant set %BUILDFAILEDxx%=1 set %BUILDFAILEDxx%=1
? /p/p
is for prompting interactively (or reading from a file).
Otherwise, except a minor typo %BUILDFAILED32%%BUILDFAILED32%
instead of just %FAILED32%%FAILED32%
(and same for 64bit builds), this looks good (and "clean") enough for me.
You could get rid of the parentheses (for the sake of it ?) if you wrote theeach if'sif
on a single line each.