Given the following batch file:
@echo off
echo %programfiles(x86)%
set test=%programfiles(x86)%
echo %test%
if 0==0 (
set test2=%programfiles(x86)%
)
echo %test2%
the output is returned as:
C:\Program Files (x86)
C:\Program Files (x86)
C:\Program Files (x86
Notice the missing bracket on the last line.
Can anyone explain what has happened or what I've done incorrectly?