find-process icon indicating copy to clipboard operation
find-process copied to clipboard

Upgrade to powershell on windows and Change Management

Open arsinclair opened this issue 2 years ago • 2 comments

I have been reading changes in the most recent commits, preparing to install the new version because the change log in this project is non-existent, and my attention was caught by the following change https://github.com/yibn2008/find-process/commit/4dd1c156ef9ef364c1fa27c3b5e28d4b4e78d2c0

This commit changes the way processes are found on Windows from using WMIC to powershell.exe. This immediately raised many questions: what is the motivation behind this change? why the users are not informed about it? why is this not a breaking change?

Whilst, I was able to find some answers, specifically about motivation:

The WMI command-line (WMIC) utility is deprecated as of Windows 10, version 21H1, and as of the 21H1 semi-annual channel release of Windows Server. This utility is superseded by Windows PowerShell for WMI

from: https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmic

I wanted to point out that in many corporate settings running powershell as a regular user is not allowed, as a security measure. I think this change should be reflected somewhere, potentially even bumping a major version of the package. Is kinda late now, but for some consumers it might save the trouble of investigating why it suddenly stopped working.

I also wish that commit messages were more informative and detailed enough CHANGELOG was published. The HISTORY.md file in the repository does little to no help at all. I suggest this article on how to make a good Change Log: https://keepachangelog.com/en/0.3.0/.

arsinclair avatar Nov 25 '21 03:11 arsinclair

Using PowerShell also fails if powershell.exe is not in path or if PowerShell is too old and doesn't have Get-CimInstance (probably only in Windows 7 or older).

raipe avatar Apr 14 '22 09:04 raipe

Came from the BetterDiscord issue thread. Looking around, taskkill on Windows exists across versions and performs the same as wmic for ending tasks. Here's some info I could find on usage: https://stackoverflow.com/questions/53308169/terminating-a-process-from-cmd-softest-to-hardest

jacobwatkinsgit avatar Oct 24 '22 18:10 jacobwatkinsgit