Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
sebp
bysebp, December 1, 2011
thanks a lot for this check!
since there are a lot of ms updates that are neither critical nor important, i wanted to have the test only check for a given subset of update-categories.
category scheme by microsoft can be found here:
[url]http://msdn.microsoft.com/en-us/library/windows/desktop/ff357803(v=vs.85).aspx[/url]
edit vbs to more complex search criteria:
[url]http://msdn.microsoft.com/en-us/library/windows/desktop/aa386526(v=VS.85).aspx[/url]
change code to this:
' critical updates E6CF1350-C01B-414D-A61F-263D14D133B4
' security updates 0FA1201D-4330-4FA8-8AE9-B877473B6441
Set searchResult = updateSearcher.Search("(IsInstalled=0 and Type='Software' and CategoryIDs contains '0FA1201D-4330-4FA8-8AE9-B877473B6441') or (IsInstalled=0 and Type='Software' and CategoryIDs contains 'E6CF1350-C01B-414D-A61F-263D14D133B4')")
since i am not a developer, please let me know if the code might be changed in a better way. at least it is working at my site. ;-)
sebastian
since there are a lot of ms updates that are neither critical nor important, i wanted to have the test only check for a given subset of update-categories.
category scheme by microsoft can be found here:
[url]http://msdn.microsoft.com/en-us/library/windows/desktop/ff357803(v=vs.85).aspx[/url]
edit vbs to more complex search criteria:
[url]http://msdn.microsoft.com/en-us/library/windows/desktop/aa386526(v=VS.85).aspx[/url]
change code to this:
' critical updates E6CF1350-C01B-414D-A61F-263D14D133B4
' security updates 0FA1201D-4330-4FA8-8AE9-B877473B6441
Set searchResult = updateSearcher.Search("(IsInstalled=0 and Type='Software' and CategoryIDs contains '0FA1201D-4330-4FA8-8AE9-B877473B6441') or (IsInstalled=0 and Type='Software' and CategoryIDs contains 'E6CF1350-C01B-414D-A61F-263D14D133B4')")
since i am not a developer, please let me know if the code might be changed in a better way. at least it is working at my site. ;-)
sebastian