Re: Daylight saving time script - to confirm current status

Tech-Archive recommends: Speed Up your PC by fixing your registry



Could you run your eyes over this please? I am trying to use bits and
pieces from different scripts to make this work...

Wish I knew what I was doing... :(

+++++++++++++++++++++++++++++++++++++++++
Dim objNet

On error resume next

Const ForAppending = 8

sServerList = "C:\DST\Servers.txt"
sOutputFolder = "C:\DST"

Set objNet = CreateObject("WScript.NetWork")
Set objComputer = CreateObject("Shell.LocalMachine")
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oServerList = oFSO.OpenTextFile(sServerList)
While Not oServerList.AtEndOfStream
ProcessServer(oServerList.ReadLine)
Wend
oServerList.Close
Sub ProcessServer (sServer)
Set oOutPutFile = oFileSYS.CreateTextFile("C:\DST\server_dst.log",
ForAppending, True)
Set objWMIService = GetObject("winmgmts:\\" & sServer & "\root
\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM
Win32_ComputerSystem")
For Each objItem In colItems
oOutputFile.WriteLine "Server name: " & sServer
oOutputFile.WriteLine "Daylight Day: " & objItem.DaylightDay
oOutputFile.WriteLine "Daylight Day of Week: " &
objItem.DaylightDayOfWeek
oOutputFile.WriteLine "Daylight Month: " & objItem.DaylightMonth
Next
oOutputFile.Close
End Sub



.



Relevant Pages

  • Re: Need help getting processor utilization stats with WMI
    ... Here are the two scripts I've tried: ... > Set colItems = objWMIService.ExecQuery("Select * from ... > Wscript.Echo ProcTime1 ... > WScript.Echo TimeStamp1 ...
    (microsoft.public.win32.programmer.wmi)
  • Re: Computer Inventory - Win32_PhysicalMemory
    ... two scripts I do indeed receive the correct information (read: ... Set colItems = objWMIService.ExecQuery("SELECT * FROM ... For Each objItem in colItems ...
    (microsoft.public.win32.programmer.wmi)
  • RE: WMI filter for IPAddress
    ... I am not quite sure what you mean by "full scripts to filter" but you can get ... the array info out. ... Set colItems = objWMIService.ExecQuery("Select IPAddress from ...
    (microsoft.public.windows.server.scripting)
  • Re: Automating the printing of a document
    ... Set colItems = objFolder.Items ... I think you can set the default printer with WMI scripts. ... http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) ...
    (microsoft.public.scripting.vbscript)