|
| |
.ExactName Series
By default, there is an ExactName Mt/\Cmd for each entry in the
Common Command Set - External. However, the series can easily be extended to include any executable
file (or even commonly used data files). ExactNames are fully qualified and include the complete drive, full path,
filename and extension.
For example, the ExactName for
FindStr is %.FindStr%.
%.FindStr% expands to c:\winnt\system32\FindStr.exe.
(assuming Windows has been installed to c:\winnt)
The major benefits of using ExactNames are:
- To ensure that the real OS installed utilities are CONSISTENTLY invoked, even if same-name replacements have been installed
in the current directory or in the system path before
%windir%\system32.
- To provide faster response time, especially within FOR
loops or subroutines, since the script is pointed directly to the exact file instead of having to search for it (in the
current directory, then the system path, etc.).
- To permit complete removal of all command line utilities to an alternate location without changing one line of scripting code. Some secure systems do
this to avoid accidental (or intentional) use of command line utilities by unauthorized users. The new location does not have
to be in the system path, or even on the local machine!
To take advantage of ExactNames, just replace all instances of
Command
with
%.Command%
in your scripts.
|