CleanBold
CleanBold

Reputation: 1602

How to know process id of host process that executes my executable in windows service?

I have C# windows service application myapp.exe that I have installed as windows service. The process list of Task Manager shows svchost.exe as process for all windows services that are running. I want to find which out of all of these svchost.exe is running my executable.

Upvotes: 0

Views: 984

Answers (1)

Denzil Soans
Denzil Soans

Reputation: 667

You can assign a different name to your process using Project installer Class Click here to see how you could do that.

Once this is done you could get the Process ID for your application using this

Upvotes: 2

Related Questions