-
Notifications
You must be signed in to change notification settings - Fork 32
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
ps-tree on Windows 11 24H2 crashes - wmic not part of windows any more #58
Comments
The deprecated Microsoft Windows Lines 48 to 54 in 2b6476c
Here are the references to the Windows deprecation announcements starting in 2016 for the Windows Management Instrumentation command-line (WMIC) utility.
EDIT: Not mentioned in Features and functionality removed in Windows client Oct 1, 2024. -- Additional background blogs |
I don't have the same experience with Windows 11 Pro (I have Since this has been deprecated on server systems for more than 8 years, this repo should still go ahead and remove the dependency, however you might like to check again on your system. (My system was not a new install. It was an upgrade from Windows 11 23H2.) My System
Reference |
@MikeMcC399 Thanks for the tips. My system is a brand new notebook out of the box with a clean installation from a freshly generated usb stick generated with the latest release of the windows media creation tool. When I first encountered the problem I did an extensive search, but like you encountered all I found was the 2016 deprecation for Windows server and a hint for the FoD. But there is no FoD for wmic on my system. Here the information from my system (ok, I use German as may os language)
And the selection of my optional features: So it seems that Microsoft silently dropped WMIC on new systems (and kept it on upgrades). |
DISM /Online /Add-Capability /CapabilityName:WMIC~~~~
|
I just re-checked on a clean install of Windows 11 24H2 and I could install WMIC from the UI. Did you try clicking on "Features anzeigen"? If you try to search with "Hinzugefügte Features" you will only find the ones which are installed. If you click on "Verlauf anzeigen" do you see a history of WMIC removal? I think that the instructions on https://techcommunity.microsoft.com/blog/windows-itpro-blog/how-to-install-wmic-feature-on-demand-on-windows-11/4189530 are correct. It is also possible to use DISM: Feature: WMIC. A Windows Management Instrumentation (WMI) command-line utility. DISM Capabilities Package Servicing Command-Line Options Via Admin Terminal DISM /Online /Get-CapabilityInfo /CapabilityName:WMIC~~~~
DISM /Online /Add-Capability /CapabilityName:WMIC~~~~ |
ok, I got it - how silly I was :-) - if I would have read the complete text than it would have been clear to me that "added features" means "added features" not "features that could be added". And they made such a beautiful colored button to show availabe features 😄. My only excuse is that this is my first win11 system. Thanks for getting this right. Anyway, I think it makes sense to use powershell to get the list of processes - or do you think that my pr is unnecessary? Would it be enough to add a short section to the readme, saying that we need WMIC and that this could be installed as a FoD on newer windows systems? |
I initially made the same mistake, so don't be too hard on yourself 🙂 Feedback on next steps now needs to come from the maintainers. Given that Windows is still in a deprecation phase (which started in 2016) there is currently no urgent pressure to change the repo. It would however make sense for the repo to remove its dependency on WMIC, and if that is going to be delayed, then putting a note into the README > Windows section referring to the document How to install WMIC Feature on Demand on Windows 11 would also be helpful. |
The issue also affects Windows Server: Features removed or no longer developed starting with Windows Server 2025 includes the section
|
…windows systems)
On windows systems ps-tree uses WMIC to get the list of child processes (line 51 in index.js).
WMIC has been available as a Feature-on-Demand (FoD) for Windows 11 since 2022. My new system is Win11pro 24H2 and there is no more WMIC on this system, not even available as FoD.
As a consequence ps-tree crashes when trying to get the list of child processes. I was encountering this problem, when using the
start-server-and-run
package (see its issue #384).The official statements recommend to use powershell instead of WMIC.
The text was updated successfully, but these errors were encountered: