M
Marc Meltzer
I am trying to run a simple script in an environment that has both Windows
Vista and Windows 2000:
----- script below -----
if %os_version% == 5.0.2195 goto W2k
:Vista
echo "Windows Vista"
got End
:W2k
echo "Windows 2000"
:End
----- end script -----
This runs fine on Windows 2000, but in Vista I get the error "goto was
unexpected at this time"
If I remove the %%, then the script runs, although it never evaluates
properly. I guess the question is how can I run this script on both OSes so
it evaluates properly?
Thanks,
Marc
Vista and Windows 2000:
----- script below -----
if %os_version% == 5.0.2195 goto W2k
:Vista
echo "Windows Vista"
got End
:W2k
echo "Windows 2000"
:End
----- end script -----
This runs fine on Windows 2000, but in Vista I get the error "goto was
unexpected at this time"
If I remove the %%, then the script runs, although it never evaluates
properly. I guess the question is how can I run this script on both OSes so
it evaluates properly?
Thanks,
Marc