Trying to get a report (eventually) sent to me every day that shows computers that have had new software installed in the last day.
So Im using the “InstallDate” key of the uninstall registry
q:( values “InstallDate” of it) of keys of keys “HKLM\software\microsoft\windows\currentversion\uninstall” of ( x32 registries;x64 registries)
which, of course, returns yyyy/mm/dd
Trying to get the above to compare with
q:( (year of it as string & month of it as two digits & day_of_month of it as two digits) of date(local time zone) of it of now as string)
which also returns yyyymmdd
so if I try and string the two together in its simplest form, I get " A singular expression is required.
I think I understand this is because the data today is singular and there are plural results in the registry
Another way, borrowing code from elsewhere, i tried…
q:(current date - ((it as date) of (last 2 of it & " " & (substring (4,2) of it as integer as month as three letters) & " " & first 4 of it) of firsts 8 of (values “InstallDate” of keys of keys “HKLM\software\microsoft\windows\currentversion\uninstall” of ( x32 registries;x64 registries) as string)) ) < day * 7
but got the same results (Singular expression is required.)
Eventually I would like to get this into a web report to trigger once a day if any changes were made but for the time being just getting this to work would be nice