chore: Cleanup WMI relating code from CpuDetector#3122
Merged
Conversation
timcassell
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR cleanup WMI relating code from CpuDetector for Windows
What's changed in this PR
1. Rename
Wmicrelated names toWmiexcept forWmicCpuDetectorBecause these models are shared between Wmi and Cim.
2. Remove
PowershellWmiCpuInfoParserReplace to use
WmiCpuInfoParserinstead,Because these parser accept same input. and used logics are same. (Only indent/variable name is different)
3. Remove
PowershellWmiCpuInfoParserTests.csAs far as I've confirmed, these tests are covered by existing
WmiCpuInfoParserTests.4. Other changes
WmicCpuDetector.cs: Modify doc comments. and modify indents.WmiCpuInfoParserTests.cs: Modify test code to use raw string literalNotes
wmic.exeis already not installed on latest version of Windows11/Windows Server 2025.And it's completely removed in the next Windows feature update.
https://support.microsoft.com/en-us/topic/windows-management-instrumentation-command-line-wmic-removal-from-windows-e9e83c7f-4992-477f-ba1d-96f694b8665d