Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mk_inventory.vbs to include UBR in Windows OS version #745

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gabrielgbs97
Copy link

Retrieve minor windows version, this is useful to quickly know patch level among hosts.

See: https://ideas.checkmk.com/suggestions/484201/windows-mk_inventoryvbs-add-ubr-to-kernel-version

General information

Modified mk_inventory.vbs script to include full windows os version.

Bug reports

https://ideas.checkmk.com/suggestions/484201/windows-mk_inventoryvbs-add-ubr-to-kernel-version

Proposed changes

Query the registry in the same manner as in other parts of the script. I did not modify getWMIObject2, but rather rewrote a specific version of it to keep the code clean.

  • What is the expected behavior?
    Retrieve Full windows version
  • What is observed behavior?
    WMI inherently collects only the major build number, for instance, Windows 10 1809 corresponds to 10.0.17763. However, the complete version including the LCU would be 10.0.17763.6054.
  • If it's not obvious from the above: In what way does your patch change the current behavior?
    It queries registry for UBR number with existing object in the script to reutilize it. If UBR is not available, it does not append anything.
  • Consider writing a unit test that would have failed without your fix.
  • Is this a new problem? What made you submit this PR (new firmware, new device, changed device behavior)?

Copy link

github-actions bot commented Aug 9, 2024

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@gabrielgbs97
Copy link
Author

I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA.

@gabrielgbs97
Copy link
Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants