#If Version

The #IF VERSION comparison conditional statement is used to control the display of certain policy settings and features in the Administrative Templates node, based on the version of Group Policy Object Editor used.

#IF VERSION allows for part of the .adm files to be conditionally parsed and ignored by earlier versions of Group Policy Object Editor tool. For example, the SUPPORTED tag is not supported by versions of Group Policy Object Editor earlier than version 4. For this reason any statement using the SUPPORTED tag should be enclosed by #If Version...#endif.

The format for the #IF VERSION conditional statement is:

#if version operator versionNumber

[Group Policy administrative template definition statements]

#endif

operator

The valid version comparison operators are:

OperatorSignifies
> (GT) Greater than. For example, a > b means a is greater than b.
< (LT) Less than. For example, a < b means a is less than b.
== (EQ) Equal. For example, a == b means a is equal to b.
!= (NE) Not equal.
>= (GTE) Greater than or equal to. For example, a >= b means a is greater than or equal to b.
<= (LTE) Less than or equal to. For example, a <= b means a is less than or equal to b.

 

versionNumber

You can specify that any part of your .adm file be evaluated only in specific versions of the Group Policy editing tools. The versions of the Group Policy editing tools are:

Operating System(s)VersionEvaluated with
Windows XP with Service Pack 1 (SP1) and later, Windows Server 20035.0Group Policy editing tools
Windows XP4.0Group Policy editing tools
Windows 20003.0Group Policy editing tools
Windows NT 4.02.0System Policy editing tools
Windows 951.0System Policy editing tools

 

Related topics

Group Policy Overview
Group Policy File Formats

 

 

Show:
© 2014 Microsoft. All rights reserved.