Open-AudIT
https://www.open-audit.org/phpBB3/

audit_custom_software.inc - Daylight Savings Time update
https://www.open-audit.org/phpBB3/viewtopic.php?f=5&t=2178
Page 1 of 1

Author:  qc_metal [ Thu Mar 01, 2007 8:29 am ]
Post subject:  audit_custom_software.inc - Daylight Savings Time update

Windows XP, 2003, etc. have an actual update that is deployed via Windows Update/WSUS so reporting against this is easy.

However, Windows 2000 requires updating a few registry keys, and there isn't a real easy way to figure out if you have it installed or not!

Fortunately Open-Audit comes to the rescue.

I put together this code to figure out who has the DST update:

[code]
'****************************************************************************
'Daylight Savings Time update
'****************************************************************************
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion"
strValueName = "ProductName"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,sOS

strKeyPath = "system\currentcontrolset\control\timezoneinformation"
strValueName = "DaylightStart"
oReg.GetBinaryValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,W2KDST

display_name = "Daylight Savings Time update"

For i = lBound(W2KDST) to uBound(W2KDST)
sValue = sValue & W2KDST(i)
'wscript.echo sValue
Next
W2KDST1 = sValue

If W2KDST1 = "0030202000000000" Then
DSTUpdate = sOS & " DST"
ElseIf W2KDST1 = "00110102000000000" Then
DSTUpdate = sOS & " DST"
Else
DSTUpdate = "DST update not installed"
'DSTUpdate = ""

End If

'If DSTUpdate <> "" then
form_input = "software^^^" & display_name & "^^^" _
& DSTUpdate & "^^^" _
& "" & "^^^" _
& "" & "^^^" _
& OSInstall & "^^^" _
& "Microsoft Corporation^^^^^^^^^^^^^^^^^^" _
& "" & "^^^" _
& "" & "^^^" _
& "" & "^^^ "
entry form_input,comment,objTextFile,oAdd,oComment
form_input = ""
'End If

'****************************************************************************
[/code]

I pondered whether or not I wanted computers that did not have it installed to report in, but then I thought it would be easier to determine who needed it if I made the version info say 'not installed'. That's why you'll see some commented lines there.

Thought this would help out others...

Rob

Author:  JayDee [ Fri Mar 02, 2007 7:52 am ]
Post subject: 

Rob,
This is certainly a feature I can use to make sure nothing has escaped the update process. One question though...for those of us less technically adept..where would I insert this code? :)

Thanks for your efforts!

John

Author:  mikeyrb [ Fri Mar 02, 2007 8:32 am ]
Post subject: 

You should be able to just add it to audit_custom_software.inc. If that file is in the same path as audit.vbs, it will executed.

Author:  JayDee [ Sat Mar 03, 2007 3:43 am ]
Post subject: 

Yes that did it, thanks!

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/