WMI Repository size enumeration relevance fails

The following relevance works as expected on “C:\Windows\Temp”:

(if (0<(it / (1024*1024*1024*1024))) then (it / (1024*1024*1024*1024)) as string & " TB" else if (0<(it / (1024*1024*1024))) then (it / (1024*1024*1024)) as string & " GB" else if (0<(it / (1024*1024))) then (it / (1024*1024)) as string & " MB" else if (0<(it / (1024))) then (it / (1024)) as string & " KB" else (it as string & " B")) of (sums of ((sum of sizes of descendants of it) of folders "C:\Windows\Temp"))

The same relevance does not work on the WMI repository folder “c:\windows\system32\wbem\repository”:

(if (0<(it / (1024*1024*1024*1024))) then (it / (1024*1024*1024*1024)) as string & " TB" else if (0<(it / (1024*1024*1024))) then (it / (1024*1024*1024)) as string & " GB" else if (0<(it / (1024*1024))) then (it / (1024*1024)) as string & " MB" else if (0<(it / (1024))) then (it / (1024)) as string & " KB" else (it as string & " B")) of (sums of ((sum of sizes of descendants of it) of folders "c:\windows\system32\wbem\repository\"))

Am I running into a relevance limitation or is there a permission/access issue at play?

Cheers,
Emil

First thought is to be careful with these recursive filesystem evaluations.

Second is that the Bigfix client is 32-bit, so by default “c:\windows\System32” actually looks in Syswow64

Recode to either

x64 folder "c:\windows\system32\wbem\repository"

or

folder "wbem\repository" of system x64 folder

2 Likes

Thanks. Problem solved.

Cheers,
Emil