time zone

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dears;

I am having w2k domain environment with 500 workstations. I need a way to
uncheck the Automatically adjust daylight saving check box from central
location without access each pc individually

Please advice
 
Mhd,

The checkbox is held here:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation

Key: 'DisableAutoDaylightTimeSet'
Type: DWORD
Value: 1 = Disable, 0 Enable

(1 unchecks the checkbox)

When you uncheck the checkbox it deletes 'DisableAutoDaylightTimeSet' from
the registry

Here is a script that I have just written that will read in from a text file
the computer name & then set the registry value that you require:

Const HKEY_LOCAL_MACHINE = &H80000002
Const INPUT_FILE_NAME = "C:\ComputerList.txt"
Const FOR_READING = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(INPUT_FILE_NAME, FOR_READING)
strComputers = objFile.ReadAll
objFile.Close
arrComputers = Split(strComputers, vbCrLf)
For Each strComputer In arrComputers
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\TimeZoneInformation"
strEntryName = "DisableAutoDaylightTimeSet"
dwValue = 1
objReg.SetDWORDValue HKEY_LOCAL_MACHINE, strKeyPath, strEntryName, dwValue
Next

I hope this helps,
 
Dear Newbie;

Thx a lot for this valuable info.

but this is the first time that I am using scripts, so please could you give
me more details how i can use it
 
Back
Top