Convert hex date to physical date property from registry

(imported topic written by Matt.Johnson)

Hello everyone. I need to design a property that can take a hex date from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate and turn it in to a physical date that BigFix can use for relevance ( value > 1 day older from now), and it would be nice if the property is easy to read.

So this is really a 2 part question:

  1. What relevance would I use to convert that key for understandable/usable date information?

  2. What relevance code would I use to say I want to only see devices imaged MORE than 2 days ago?

Thanks for any and all help!!!

Matt

(imported comment written by SystemAdmin)

This ought to get you started:

q: ((“Thu, 1 Jan 1970 00:00:00 -0500” as time) + ((((value “InstallDate” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion” of native registry) as integer) / 60 / 60 / 24) * day))

A: Wed, 31 Oct 2012 00:00:00 -0500

T: 0.129 ms

I: singular time

q: if (now - ((“Thu, 1 jan 1970 00:00:00 -0500” as time) + ((((value “InstallDate” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion” of native registry) as integer) / 60 / 60 / 24) * day))) > (2* day) then “Do Something” else “Newly Imaged”

A: Do Something

T: 0.122 ms

I: singular string