Use C# to Find What Services are Running in a Process C #で使用するサービスが実行されているものを見つけるプロセス
Note: this content originally from 注意:このコンテンツは当初から http://mygreenpaste.blogspot.com http://mygreenpaste.blogspot.com . 。 If you are reading it from some other site, please take the time to visit それを読む場合は、いくつかの他のサイトからは、時間を割いてに訪問してください。 My Green Paste, Inc 私の緑色のペースト株式会社 . 。 Thank you. ありがとうございます。
Recently, an individual going by the moniker 'hi' posted最近では、個々に行くの俗称'こんにちは'投稿 a commentコメント toを Setting the Priority of a Service Process via Scriptサービスプロセスの優先度を設定するスクリプトを介して : :
How would I, if I want to, find which services are part of a particular svchost.exe?どのように私は、表示したい場合には、どのサービスを見つけるには、特定の団体名svchost.exeですか? Can in be done in C#? C #の中で行われる必要ができますか?
Thanks!ありがとう!
I replied私は答えた via commentを介してコメント , but one has even less control over formatting in comments than one does in the actual blog posting, so I figured I would post the response here as well.が、 1つのフォーマットを制御するには、少なくても1つ以上のコメントは、実際のブログに投稿するので、多分そうだろう後、私はここにも対応します。
=================
Tasklist.exe tasklist.exe with the /svc param can tell you, as canを使って/ param svcが言えるのは、できる Process Explorerプロセスエクスプローラ . 。 You can also inspect the registry to determine what services would load with what SVCHOST group (see "視察することもできますが、レジストリの負荷を判断してどのようなサービスをどのようなsvchostグループ(詳細については、 " Troubleshooting Performance Issues with Automatic Updatesパフォーマンスの問題のトラブルシューティングを自動更新 " for more details). "を参照してください) 。
As far as C# code, the following requires a reference to System.Management.限りC #のコードは、次のリファレンスをsystem.managementが必要です。 Invoke the program, passing it the process id of the process you're curious about, and it will output the services running in that process.このプログラムを呼び出す、合格することは、プロセスのプロセスIDを知りたがる君は、それは、そのプロセスを実行して出力するサービスです。
using System;を使用してシステム;
using System.Management;を使用してsystem.management ;
namespace MyGreenPasteネームスペースmygreenpaste
{ (
classクラス
Written by «/\/\Ø|ö±ò\/»®© on « â書かれ/ \ / \ ã 〜 | ã ¶ â ± ã ² \ / » â â â © ®上 February 7th, 2008 2008年2月7日 with して no comments コメントはありません . 。
Read more articles on こちらの記事を読む Process Explorer プロセスエクスプローラ and と tasklist tasklist and と WMI WMIの and と SVCHOST svchost and と otherSoftware othersoftware and と c# C #で and と processes プロセス and と services サービス . 。













