Batch File: Display Current Time Zone Tags: Display Windows XP Last response: October 6, 2011 9:08 PM in Windows XP Share draxsath January 24, 2009 7:14:28 PM I'm writing a complex batch file and i require one of the variables in the file to be what the current time zone of the machine is set to. so far i have: Quote:reg query HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TimeZoneInformation /v standardname | FIND "REG_SZ" This returns: Quote: standardname REG_SZ Eastern Standard Time All I need is the last part: "Eastern Standard Time" put into a variable. I'm totally stuck, anyone know how to do this? I know to change the time zone you do: Quote:RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z Eastern Standard Time but i don't need to change it, i need to know what it's set at currently. More about : batch file display current time zone | E-mail me updates | Report abuse Register or log in to remove Snertly October 6, 2011 9:08:19 PM Better late than never? Anyhoo, wrap a for statement around your reg query to parse the output of the reg query for the part you want. (all on one line) for /f "skip=4 tokens=2*" %a in ('reg query HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v standardname') do echo %b note: skip=4 if for XP, =2 for Win2K3 double percents (%%) if it's in a batch file echo %b can be replaced by most any valid statement | Report abuse Ask the community Publish Tom's Hardware>Forum>Windows XP>Batch File: Display Current Time Zone> Related ressources: ForumWindows 7 batch file newbie Forumenable/disable wireless networking batch file ? ForumWinXP Batch File ??? ForumBatch file ForumBatch shutdown Forumprint start time of a batch file (at it's completion)? ForumTime Zone Help ForumBatch file work differently on two different Windows XP in.. ForumBatch file under Windows XP ??? ForumBatch file Xcopy without manual F ForumBatch Help - Copying ForumBatch File execution problems ForumBatch File - "Access Denied" On Windows 7? ForumBatch file command output to variable Forumchkdsk- batch file for 4 parttitions ForumHow to run a batch file upon logging off ForumHELP!!! Please with Windows XP ForumBatch file Xcopy without manual F Forum"Cannot Open The File" - Is This Message Driving You Crazy? ForumWindows Sytem file missing - help More resources Read discussions in other Windows XP categories Configuration Customization Drivers Security Video !