
例如,我知道該服務使用“myservice.exe”。如何從 MS-DOS 提示字元或 Powershell 中使用此任務尋找已註冊的服務名稱?
答案1
如何透過任務名稱找到服務
wmic service
與 一起使用findstr
。
例子:
C:\Users\David>wmic service get DisplayName, PathName | findstr httpd.exe
wampapache64 "c:\wamp\bin\apache\apache2.4.9\bin\httpd.exe" -k runservice