----^--->
/\

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

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

ifDC

Booming Or Fuming? | MasterCatalog | ntlib (FREE) | NTCmdLib | MtCmds | Scripts | Almost Free | TheGuardBook | Help

 

Types of
.Mount/\Commands

.CrystalClear | .ExactName | .ExitELn | .GetValue | .ifCondition | .ifELn | .IsPattern | .ListValue | .NetValue | .NowValue | .RedirRapids | .ReliableReporting | .RestoreValue | .SetELn | .ValueEcho

.ifCondition
Series

  if2K | ifDC | ifK3 | ifNT | ifServer | ifWkstn | ifXP

.ifDC/.ifNotDC

Description

  1. .ifDC evaluates TRUE if running on a Domain Controller, otherwise FALSE.
  2. .ifNotDC evaluates TRUE if NOT running on a Domain Controller, otherwise FALSE.

Syntax

%.ifDC%   Command1[ELSE Command2]
%.ifNotDC%   Command1[ELSE Command2]

Parameters and Switches

none

   

Errorlevels and Output Variables

none

   

Examples, Notes and Instructions

NT
2K

K3
C:\GuardPost>%.ifDC% ECHO:This is a Domain Controller
This is a Domain Controller
C:\GuardPost>%.ifNotDC% ECHO:This is NOT a Domain Controller
C:\GuardPost>
   
NT
2K
XP
C:\GuardPost>%.ifNotDC% ECHO:This is NOT a Domain Controller
This is NOT a Domain Controller
C:\GuardPost>%.ifDC% ECHO:This is a Domain Controller
C:\GuardPost>

  • Syntax is the same as the built-in IF command

Related .Mount/\Commands, #Constants, $Functions, :Procedures

Resource

  Short Description
.ifServer   TRUE if running on a Server OS.  Otherwise FALSE.
.ifNotServer   TRUE if NOT running on a Server OS.  Otherwise FALSE.
.ifWkstn   TRUE if running on a Workstation OS.  Otherwise FALSE.
.ifNotWkstn   TRUE if NOT running on a Workstation OS.  Otherwise FALSE.
.GetRole   Displays the current Role (Server/Wkstn) -AND- updates #role
#role   Operating System Role (Server/Wkstn)

 

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

.ifCondition
Series

  if2K | ifDC | ifK3 | ifNT | ifServer | ifWkstn | ifXP
/\
//\\
//
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\