Version 'less than' with alpha-numeric characters

I’m trying to setup a relevance for updating BIOS on our computers. Unfortunately, HP decided that its versioning has to be alpha numeric so the usual statements of less than or equal to is not working. How to I setup a relevance that looks for computers with a BIOS version less than or equal to “N76 Ver. 01.17”?

Ah, the joy of dealing with Spectre-Meltdown. :face_with_symbols_over_mouth:

Is that pattern consistent? Is “N67” a version for a model, and “01.17” a sub version?

I’m already using a separate relevance for the model. I’ve setup a property as follows:

unique values whose(it != “”) of (it as string as trimmed string) of values “bios_version” of structures “bios_information” of smbios

What is returned to BigFix is “N76 Ver. ##.##” or L01 v##.##"

I’m not totally sure how your version check needs to work, but could this work?

q: ((following text of first "N" of (preceding text of first " Ver. " of it) & "." & following text of first " Ver. " of it) of "N76 Ver. 01.17") as version
A: 76.1.17
1 Like

It appears to work running it through the fixlet debugger so I’ll give it a try in fixlet and see how it works.

You may want to throw a regular expression in front of this too on your fixlet. That relevance will obviously blow up if it doesn’t line up right.

q: "N76 Ver. 01.17" = regex "(N[0-9]{2} Ver. [0-9]{2}.[0-9]{2})"
A: True

…I’m not the best at expressions, but that is a start.

Your first suggestion is working and that’s good enough for me. I can modify it as needed. Thank you for the help!!

What seems to work for me pretty consistently is to break out the “system_bios_major_release” and “system_bios_minor_release” properties separately…

q: (system_bios_major_release of it as string & "." & system_bios_minor_release of it as string) of bios_informations of dmi as version
A: 3.91
T: 0.245 ms
I: plural version

q: bios_versions of bios_informations of dmi
A: J61 v03.91
T: 0.108 ms
I: plural string

q:  values "bios_version" of structures "bios_information" of smbios
A: J61 v03.91
T: 0.133 ms
I: plural smbios value
1 Like