Skip to content

chore: Cleanup WMI relating code from CpuDetector#3122

Merged
timcassell merged 1 commit into
dotnet:masterfrom
filzrev:chore-cleanup-wmi-related-code
May 11, 2026
Merged

chore: Cleanup WMI relating code from CpuDetector#3122
timcassell merged 1 commit into
dotnet:masterfrom
filzrev:chore-cleanup-wmi-related-code

Conversation

@filzrev
Copy link
Copy Markdown
Contributor

@filzrev filzrev commented May 11, 2026

This PR cleanup WMI relating code from CpuDetector for Windows

What's changed in this PR

1. Rename Wmic related names to Wmi except for WmicCpuDetector
Because these models are shared between Wmi and Cim.

2. Remove PowershellWmiCpuInfoParser
Replace to use WmiCpuInfoParser instead,
Because these parser accept same input. and used logics are same. (Only indent/variable name is different)

3. Remove PowershellWmiCpuInfoParserTests.cs
As 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 literal

Notes

wmic.exe is 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

@filzrev filzrev marked this pull request as ready for review May 11, 2026 06:33
@timcassell timcassell merged commit af4f924 into dotnet:master May 11, 2026
11 checks passed
@timcassell timcassell added this to the v0.16.0 milestone May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants