|
| |
|
Types of
.Mount/\Commands |
|
*Pre-Release* Twin^^Peaks
Description
Attempts to contact the target specified in the contents of variable %Alive%. Provides several essential pieces of information in a
flexible way to allow self-documenting usage.
- Expands the input variable at runtime so complex statements can be created easily.
- Filters success messages to STDOUT, failure messages to STDERR.
- Sets an errorlevel to allow custom formatting of the output.
Syntax
|
SET "Alive=TheSystemGuard.com" |
|
|
|
%.Alive% |
|
|
or, all on one line,
|
SET "Alive=TheSystemGuard.com" &
%.Alive% |
|
|
Parameters and Switches
|
Alive |
|
An input variable containing the target
to check. This value can be
1. DNS Name {TheSystemGuard.com}
2. IP Address {10.7.7.1}
3. NetBIOS Name {Mount} |
|
|
|
|
Errorlevels and Output Variables
|
Display to
STDOUT |
|
Display to
STDERR |
|
Error
Level |
|
Description of Result |
|
Target is
alive |
|
|
|
0 |
|
Target system was found |
|
|
|
Target is
unreachable |
|
1 |
|
Target system did not respond |
| |
|
Input variable is
undefined.
Place your input
in variable Alive. |
|
2 |
|
Input variable was not defined |
Examples, Notes and Instructions
- %.Alive% is a Twin^^Peaks
Mt/\Cmd. This means that it is a two step command. Load the input parameter, then run the command.
SET
"Alive=[IPAddress|FullyQualifiedDNSName|NetBiosName]"
%.Alive% |
- Since all Twin^^Peaks
commands dynamically expand their input variable at runtime, you can place both commands on the same line, or within the same complex statement (see the examples below).
- When the target is found, a success message is sent to STDOUT. When it is not found, an error message is sent to STDERR. This lets you display only what you want to see.
Example 1 Scan an entire subnet
This command will check all addresses from 10.7.7.10 through 10.7.7.254
Example 2 Check a subnet, show only the addresses that respond.
Same as above but using the .Kity (Keep-It-To-Yourself) command to filter out anything sent to STDERR.
Example 3 Check the local network, display the names of systems that are not accessible.
Using the output from the escaped
version of
.NetView, test each machine. If you find it, keep
Quiet.
If not, display the machine name.
Example 4 Check a list of machines from a text file.
Example 5 At the command line.
NT
2K
XP
K3 |
C:\GuardPost>SET "Alive=ntlib.com"
C:\GuardPost>%.Alive%
ntlib.com is alive
C:\GuardPost>SET "Alive=1.2.3.4"
C:\GuardPost>%.Alive%
1.2.3.4 is unreachable
C:\GuardPost> |
Related .Mount/\Commands, #Constants,
$Functions, :Procedures
|
Resource |
|
Short Description |
| |
|
|
|
K
E
Y |
Common Commands |
INTERNAL |
External |
/SWITCH |
Parameter |
Help text |
AddonTool |
|
Mounted Commands |
.Mount/\Command |
CmdShorthand |
#Constant |
$FUNCTION |
:Procedure |
!GuardNote |
|
Operating Systems |
NT/2K/XP/K3 |
NT Only |
NT/2K |
2K Only |
2K/XP |
XP Only |
XP/K3 |
K3 Only |
2K/XP/K3 |
|