So far as I know, the documented way to test whether command extensions are enabled is something like the following.
echo %0, Version 1.00 Starting
if CMDEXTVERSION 1 goto CHK_REQ1
echo.
echo This script requires command extensions to be enabled. Since they are
echo enabled, by default, they have been disabled, directly or by GPO.
goto ERR_DONE
:CHK_REQ1
For the first time in a long while, I temporarily disabled command extensions to perform a special test. To verify that command extensions were actually disabled, I ran a command script that begins by verifying that command extensions are enabled. I expected the error message listed above to be displayed. This is what actually happened.
C:\bin>CopyOneToAll.CMD
CopyOneToAll.CMD, Version 1.00 Starting
1 was unexpected at this time.
C:\bin>
This isn’t exactly what I expected.
Since I can complete the test without further investigation, the mystery has been put aside for now.
David A. Gray
Chief Wizard
WizardWrx
Email: dgray@wizardwrx.com
WWW: www.wizardwrx.com
Cell: +1 (817) 298-0867
Land: +1 (817) 812-3041
4014 Double Tree Trail
Irving, TX 75061-3936