----^--->
/\

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

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

ifXP

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

.ifXP/.ifNotXP

Description

  1. .ifXP evaluates TRUE if running on Windows XP, otherwise FALSE.
  2. .ifNotXP evaluates TRUE if NOT running on Windows XP, otherwise FALSE.

Syntax

%.ifXP%   Command1[ELSE Command2]
%.ifNotXP%   Command1[ELSE Command2]

Parameters and Switches

none

   

Errorlevels and Output Variables

none

   

Examples, Notes and Instructions

XP C:\GuardPost>%.ifXP% ECHO:This is Windows XP
This is Windows XP
C:\GuardPost>%.ifNotXP% ECHO:This is NOT Windows XP
C:\GuardPost>
   
NT
2K
K3
C:\GuardPost>%.ifNotXP% ECHO:This is NOT Windows XP
This is NOT Windows XP
C:\GuardPost>%.ifXP% ECHO:This is Windows XP
C:\GuardPost>

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

.ifCondition
Series

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

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

Resource

  Short Description
.ifNT   TRUE if the OS is Windows NT.  Otherwise FALSE.
.ifNotNT   TRUE if the OS is NOT Windows NT.  Otherwise FALSE.
.if2K   TRUE if the OS is Windows 2000.  Otherwise FALSE.
.ifNot2K   TRUE if the OS is NOT Windows 2000.  Otherwise FALSE.
.ifK3   TRUE if the OS is Windows Server 2003.  Otherwise FALSE.
.ifNotK3   TRUE if the OS is NOT Windows Server 2003.  Otherwise FALSE.
.GetOS   Displays the current OS (NT/2K/XP/K3) -AND- updates #os
#os   Operating System Code (NT, 2K, XP or K3)

 

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\