Ok indeed it can be done easier without using the memory location, but the code needs some corrections.
NO.
The code *needs* NOT any correction.
The 11,1 vs the 10,2 only depends on what you want, I prefer 01 (and 00) over 1 and 0, because I tend to reason in bytes, but - as hinted earlier - if you prefer 0 and 1 you can still have the whole byte and use either set /A or set /a to turn it in a numerical value, otherwise in the if check you are comparing a string and #01=#01 works EXACTLY as #1=#1.
As a side note, since a byte is a byte, 01 is a "unique" value, whilst:
01
11
21
31
41
51
61
71
81
91
A1
B1
C1
D1
E1
F1
would be all good with 11,1.
Personally I would however use 42 as the check value.
Using a single menu.lst that can be embedded in grub4dos is also a good idea
Sure it is, and that is actually *needed*, otherwise it would be trivial to workaround the check.
As well it will be *needed* to remove from the grub4dos (and/or GRUB2) used in the "first boot" sequence (very likely a grldr loaded from grldr.mbr written to mbr+hidden sectors[1]) any possibility to drop to command line.
Avoiding possible sources of error is not a limitation, but is an improved approach based on experience ....
One thing is warning about possible issues, another one is advising to not do this or that, to be "kosher" one (and one only) primary and at the most one (and only one) Extended should be in the MBR leaving not one, but two slots free.
Wonko
[1] personally I would NOT use the normal grldr.mbr+grldr, but rather the umbr, writing the actual grldr in the unused space before first partition, since this is related to some form of "secure" booting, in a "static" context ("static" in the sense that once a machine is configured it remains unchanged) the more we make it complex to exit the intended flow, the better.