----^--->
/\

//\\
//The\
/Sy
stem\
////
Guard
\

In the mount of the LORD it shall be seen. Genesis 22:14

 

Types of
.Mount/\Commands

CrystalClear
Series

 

*Pre-Release* Twin^^Peaks

.Alive *download the pre-release code*

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.

  1. Expands the input variable at runtime so complex statements can be created easily.
  2. Filters success messages to STDOUT, failure messages to STDERR.
  3. 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

FOR /L %%A IN (1,1,254) DO @(SET "Alive=10.7.7.%%A" & %.Alive%)

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.

%.Kity% (FOR /L %%A IN (0,1,255) DO @(SET "Alive=10.7.7.%%A" & %.Alive%))

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.

%.Quiet% (FOR /F %%A IN ('%.eNetView%') DO @(SET "Alive=%%A" & %.Alive%))

Example 4 Check a list of machines from a text file.

FOR /F %%A IN (list.txt) DO @(SET "Alive=%%A" & %.Alive%)

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
     

 

CrystalClear
Series

 

 

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
/\
//\\
//
The\
/Sy
stem\
////
Guard
\
COME ON UP WITH US!
and
Congratulations On Your Decision
to
RISE ABOVE
THE REST!

^
/
!\
/LIB\

TheSystemGuard.com [Revised: 2007-03-29]
Copyright © 1995-2007, JWC
Computer Communications,
All Rights Reserved, Worldwide.
 Disclaimer       Privacy       About Us       More


Communication Is Business!

We Master It With Knowledge!

^
/
.\
/M^C\