Session relevance question

(imported topic written by sinucus)

I’m working with the following code and I can’t figure out how to get the information I’m looking for.

unique values of matches (regex "\b

0-9a-f

{40}\b") of (scripts of actions of fixlets of bes custom sites whose (display name of it = “custom”))

I also want to get the ID of the fixlet that is returned with the results.

Also, as a side note to this question, I’ll pose this as the reason why I have this session relevance. I’m trying to consolidate my sha1 repository with all the fixlets within my sites. I.E. I have a fixlet and I want to ensure that I already have the patch pre-cached.

I’ve used the Pre-cache wizard in the BES Support site, but there appears to be a bug with it, I had some fixlets which I had downloaded from the Enterprise Support site, which could not be picked up by the pre-cache wizard. The action script looked like the following. It appears that if the sha value was contained after the “first” “continue if” line, it would fail.

download http://download.microsoft.com/download/1/4/F/14FC5661-BAE3-4726-A4F4-A237B6267D3D/Windows6.1-KB2536275-x64.msu

// Is Windows Update service running?

continue if {exists running service “wuauserv” OR NOT exists service “wuauserv” whose (start type of it = “disabled”)}

continue if {(size of it = 972323 AND sha1 of it = “03bdf9e393292e660d875bed68be6de392ad6507”) of file “Windows6.1-KB2536275-x64.msu” of folder “__Download”}

waithidden “{pathname of system folder & “\wusa.exe”}” “{pathname of client folder of current site & “__Download\Windows6.1-KB2536275-x64.msu”}” /quiet /norestart

action requires restart “03bdf9e393292e660d875bed68be6de392ad6507”

So, I use this custom session relevance to scan all fixlets looking for sha values, then compare the results to my sha1 folder and look for differences.

I then need to locate the individual fixlet that has that sha value and manually find the download link so that I can cache.

Thanks…

(imported comment written by jeremylam)

I passed the id of the Fixlet object up along with its action script (modified for all bes sites, not custom ones):

code

unique values of (it as string) of (item 1 of it, matches (regex "

0-9a-f

{40}") of item 0 of it) of (scripts of actions of it, id of it) of (fixlets of bes sites)

code

There may be multiples of the same file if that file is contained in more than one Fixlet.

(imported comment written by sinucus)

Works just like I needed! Thanks… Here is my modified version of the code you gave me.

unique values of (it as string) of (item 1 of it, matches (regex "\b

0-9a-f

{40}\b") of item 0 of it) of (scripts of actions of it, id of it) of (fixlets of bes custom sites whose (display name of it = “custom”))