wmic.exe is being removed from Windows — Windows CPU/memory/disk detection will break
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- perl, powershell
- Domain
- operating-systems
Research direction
Start in mysqltuner.pl at the listed WMIC calls around lines 2331, 2369, 2905, 2909, 5189, and 6807, then inspect the allowed-command regex around line 3255. Replace the Windows CPU, memory, disk, and architecture lookups with the suggested PowerShell Get-CimInstance equivalents, and verify that the detection paths still return the expected values without wmic.exe.
Written by the indexing model from the issue text.
Description
Microsoft has announced that wmic.exe (the WMIC command-line tool) is being removed from Windows:
https://support.microsoft.com/en-us/servicing/os/windows/docs/2025/09/windows-management-instrumentation-command-line-wmic-removal-from-windows
mysqltuner.pl (current master, v2.9.2) still shells out to wmic in several places for Windows system info:
wmic cpu get NumberOfCores(line 2331)wmic cpu get NumberOfLogicalProcessors(line 2369)wmic ComputerSystem get TotalPhysicalMemory(line 2905)wmic OS get FreeVirtualMemory(line 2909)wmic logicaldisk get Name,Size,FreeSpace(line 5189)wmic os get osarchitecture(line 6807)
wmic is also listed as an allowed command in the system-command regex around line 3255.
Once wmic.exe is no longer present (it's already gone on newer Windows builds, and fully removed per the linked schedule), all of these calls will fail, so Windows CPU/memory/disk/architecture detection will silently produce empty/wrong results.
Suggested fix: replace these with PowerShell Get-CimInstance equivalents, e.g.:
Get-CimInstance Win32_ComputerSystem | Select-Object -ExpandProperty TotalPhysicalMemory
Get-CimInstance Win32_OperatingSystem | Select-Object -ExpandProperty FreePhysicalMemory
Get-CimInstance Win32_Processor | Select-Object -ExpandProperty NumberOfCores
Get-CimInstance Win32_Processor | Select-Object -ExpandProperty NumberOfLogicalProcessors
Get-CimInstance Win32_LogicalDisk | Select-Object Name,Size,FreeSpace
Get-CimInstance Win32_OperatingSystem | Select-Object -ExpandProperty OSArchitecture
invoked via powershell -NoProfile -Command "..." from Perl, similar to how wmic is currently invoked with backticks.
Happy to submit a PR if that's useful.
- Dominant language
- Perl
- Stars
- 9.5k
- Forks
- 1.3k
- Avg merge
- 10h 18m
- Merged PRs (30d)
- 10
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from major/MySQLTuner-perl
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
major/MySQLTuner-perl#1007 ·
Maintainers usually reply within 1 day
-
fix(ci): enable Group Replication recovery SSL in multi-db-docker-env and fix DB_PASS resolution in test_ha.shMay be free again @jmrenouard claimed this 71 days ago, and no pull request is open. Open
major/MySQLTuner-perl#977 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
feat(ha): enhance MySQL InnoDB Cluster & Group Replication diagnosticsMay be free again @jmrenouard claimed this 71 days ago, and no pull request is open. Openenhancement PATCH DELIVERED
major/MySQLTuner-perl#976 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
feat(galera): add network queue, PK certification, and split-brain quorum diagnosticsMay be free again @jmrenouard claimed this 71 days ago, and no pull request is open. Openenhancement
major/MySQLTuner-perl#975 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Dependency DashboardMay be free again @jmrenouard claimed this 101 days ago, and no pull request is open. OpenPATCH DELIVERED
major/MySQLTuner-perl#587 · 6 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in major/MySQLTuner-perl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
jimsalterjrs/sanoid#1116 · 1 reaction ·
-
Add .gitattributes so share/skel keeps LF on a Windows git checkoutPossibly taken @sadhana-s-codez claimed this 3 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
PerlDancer/Dancer2#1854 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100