Tuesday, February 4, 2014

A Command Extension Conundrum

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

 

Saturday, January 25, 2014

Retrieving Previous Version of File from Windows Recycle Bin

Today, when I went in search of a previous version of a file that I had just sent to the Recycle Bin, I noticed that the context menu has a Cut option. Since I had already reused the file name in the directory from which I deleted the other version, I decided to see what happened when I cut the file.

Much to my delight, I was able to paste the file into a different directory. This feat enabled me to preserve the good copy that I had just assigned, while allowing me to temporarily restore the discarded file, so that I could retrieve a snippet of text from it.

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