C:\WINDOWS\system32>SetLocal EnableDelayedExpansion
C:\WINDOWS\system32>set/a Number1=3+9
12
C:\WINDOWS\system32>if !Number1!==9+3 (echo Good) else (echo Bad)
Bad
C:\WINDOWS\system32>if !Number1!==3+9 (echo Good) else (echo Bad)
Bad
C:\WINDOWS\system32>set/a i=9+3
12
C:\WINDOWS\system32>if !Number1!==%i% (echo Good) else (echo Bad)
Bad
I expected to see the last results (and maybe some others) to show Good
as a result but did not! I think this is because it is a error with the SetLocal EnableDelayedExpansion
but I need that in my code. So how do I get my expected result with SetLocal EnableDelayedExpansion
. Thanks for any help provided =)