views:

22

answers:

1

Hi guys, I am trying to reproduce Process Exporer's feature to tag a process running on the current machine with a Comment (Please see the Comment section in the Process properties in Process Explorer).

I couldn't find any way to do it with managed code, had a try with wmic utility but I wasn't able to find a way to set a property to an existing process.

Also, searching the web returns some pretty vague responses since all the search terms are so general..

If anybody has at least a hint I will appreciate it.

Alex.

P.S I am using C# for the project but I am opened to use unmanaged code if that's what it takes :)

+3  A: 

Don't you think that this is internal feature of Process Explorer? They might store with process info some string comment. In case of .net you will have Process object, just add a Dictionary<Process, string> and store comments there

Andrey
I would recommend creating a wrapper class for this rather than keeping a `Dictionary` in sync, but this is nonetheless workable.
Adam Robinson
My thoughts exactly. If you close and reopen Process Explorer after setting such a tag, is it still there?
harpo
@harpo: i have no idea. either it is not that hard to store that data in file
Andrey
@Adam Robinson agree, but i suggested Dictionary as simpler example
Andrey
@andrey I don't know if it's an internal feature. I tried closing and reopening process explorer. Deleted the temp files that process explorer creates in its folder and monitored registry for changes : nothing there. I assumed may be a Windows field that clould be acessed in some way.
AlexDrenea