DESKTOP

Windows Server 2008 and Windows Vista : Advanced Group Policy Preferences Settings - Process Variables

3/27/2014 2:15:27 AM

Group Policy Preferences also provide a seamless integration with environment variables. The environment variables that Group Policy Preferences support include those that the system generates, as well as numerous additional environment variables to the process environment.

The environment variables are available for use in many of the text boxes associated with Group Policy Preferences. Some of the settings allow for environment variables, as do some of the item-level targeting entries. As a general rule, if the environment variable contains text properties that are associated with the text box you are filling out, the environment variable will function properly.

To access the environment variables via a shortcut, press the F3 key from within the text box where you want to use the environment variable. The Select a Variable dialog box appears, as shown in Figure 1.

Figure 1. The list of supported environment variables appears when you press F3 from within the GPME; this can help you configure Group Policy Preferences settings and targeting items.


The environment variables that are supported in Group Policy Preferences settings include those listed in Table 1.

Table 1. Environment Variables Supported in Group Policy Preferences
Environment VariableVariable Use
%AppDataDir%The current user’s Application Data directory
%BinaryComputerSid%The SID of the computer in hexadecimal format
%BinaryUserSid%The SID of the log-on user in hexadecimal format
%CommonAppdataDir%The “all users” Application Data directory
%CommonDesktopDir%The “all users” Desktop directory
%CommonFavoritesDir%The “all users” Explorer Favorites directory
%CommonProgramsDir%The “all users” Programs directory
%CommonStartMenuDir%The “all users” Start Menu directory
%CommonStartUpDir%The “all users” Startup directory
%ComputerName%The NetBIOS name of the computer
%CurrentProcessId%The numeric identity of the main client process
%CurrentThreadId%The numeric identity of the main client thread
%DateTime%The current time (UTC)
%DateTimeEx%The current time (UTC) with milliseconds
%DesktopDir%The current user’s Desktop directory
%DomainName%The domain name or workgroup of the computer
%FavoritesDir%The current user’s Explorer Favorites directory
GphPathThe path to the Group Policy history file
GptPathThe path to the Group Policy configuration file
GroupPolicyVersionThe version of the running Group Policy CSE
LastDriveMappedThe drive letter of the last successful network drive mapping
%LastError%The last error code encountered during configuration
%LastErrorText%The last error code text description
%LdapComputerSid%The SID of the computer in LDAP escaped binary format
%LdapUserSid%The SID of the current user in LDAP escaped binary format
%LocalTime%The current local time
%LocalTimeEx%The current local time with milliseconds
%LogonDomain%The domain of the current user
%LogonServer%The domain controller that authenticated the current user
%LogonUser%The user name of the current user
%LogonUserSid%The SID of the current user
%MacAddress%The first detected MAC address on the computer
%NetPlacesDir%The current user’s My Network Places directory
%OsVersion%The operating system: Windows Server 2008, Windows Vista, Windows Server 2003 R2, Windows Server 2003, Windows XP, or Unknown
%ProgramFilesDir%The Windows Program Files directory
%ProgramsDir%The current user’s Programs directory
%RecentDocumentsDir%The current user’s Recent Documents directory
%ResultCode%The client’s exit code
%ResultText%The client’s exit code text description
%ReversedComputerSid%The SID of the computer in reversed byte order hexadecimal format
%ReversedUserSid%The SID of the current user in reversed byte order hexadecimal format
%SendToDir%The current user’s Send To directory
%StartMenuDir%The current user’s Start Menu directory
%StartUpDir%The current user’s Startup directory
%SystemDir%The Windows System directory
%SystemDrive%The name of the drive from which the operation system is running
%TempDir%The current user’s Temp directory as determined by Windows API, which is Local System when running in the computer context.
%TimeStamp%The time stamp of the configurations being executed
%TraceFile%The path/name of the trace file
%WindowsDir%The Windows directory
Other  
  •  Windows Server 2008 and Windows Vista : Item-Level Targeting (part 7) - Item-Level Targeting Controls, Common Item-Level Targeting Scenarios
  •  Windows Server 2008 and Windows Vista : Item-Level Targeting (part 6) - Security Group,WMI Query
  •  Windows Server 2008 and Windows Vista : Item-Level Targeting (part 5) - Portable Computer,Processing Mode, Registry Match
  •  Windows Server 2008 and Windows Vista : Item-Level Targeting (part 4) - MSI Query,Operating System, Organizational Unit
  •  Windows Server 2008 and Windows Vista : Item-Level Targeting (part 3) - Environment Variable, Language, LDAP Query
  •  Windows Server 2008 and Windows Vista : Item-Level Targeting (part 2) - Date Match, Dial-Up Connection,Disk Space, Domain
  •  Windows Server 2008 and Windows Vista : Item-Level Targeting (part 1) - Battery Present, Computer Name, CPU Speed
  •  Windows Server 2008 and Windows Vista : Advanced Group Policy Preferences Settings - Action Modes, Common Tab
  •  The Gaming Mouse: Ozone Neon
  •  Windows 8 : Understanding product editions, architectures, and hardware requirements
  •  
    Top 10
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    3 Tips for Maintaining Your Cell Phone Battery (part 1) - Charge Smart
    OPEL MERIVA : Making a grand entrance
    FORD MONDEO 2.0 ECOBOOST : Modern Mondeo
    BMW 650i COUPE : Sexy retooling of BMW's 6-series
    BMW 120d; M135i - Finely tuned
    PHP Tutorials : Storing Images in MySQL with PHP (part 2) - Creating the HTML, Inserting the Image into MySQL
    PHP Tutorials : Storing Images in MySQL with PHP (part 1) - Why store binary files in MySQL using PHP?
    Java Tutorials : Nested For Loop (part 2) - Program to create a Two-Dimensional Array
    Java Tutorials : Nested For Loop (part 1)
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS