Howdy - I want to programmatically display information through c# on Windows Services running on my machine, but in Windows 7 fields in the registry for ServiceName for example now contain a path and parameter to a dll component.
I found loadlibraryex as a way to load a dll and then I can access the needed text, but I can't for the life of me figure out how to do this in C#.
For example, if you run Services.msc you will see a displayed name of Application Information, and a bit of a description for it, but if you look at the actual data in the registry, it is actually called something like AppInfo, and there is a path in ServiceDescription instead of the description.
So ini the registry for AppInfo, is a data value for DisplayName of @%systemroot%\system32\appinfo.dll,-100, and for Description the data value isL @%systemroot%\system32\appinfo.dll,-101
So, please send me a fully working bit of code to retrieve that info
THanks!!
[email protected]
Loading
Robert BonePosted Jan 2, 2010, 12:38 AM
AGAIN, I am asking for how to reference the imbedded information in the dll pointed to in the registry key for Description. Yes ServiceName and DisplayName are there - but Description is not.
Sam HobbsPosted Jan 1, 2010, 11:23 PM
Robert BonePosted Jan 1, 2010, 8:46 PM
In XP, you could find the ServiceName and Description in the registry subkeys for each service.
In Windows 7, what is present in those subkeys is now a path/parm combination into dll modules, and that is where the display name and the description have been moved.
SO, if you look at the registry subkey 'Description' for the service 'AppInfo', you find: @%systemroot%\system32\appinfo.dll,-101. If you look at the description for the service AppInfo in Services.msc, you instead see a rather lengthy description of: Facilitates the running of interactive applications with additional administrative privileges. If this service is stopped, users will be unable to launch applications with the additional administrative privileges they may require to perform desired user tasks.
You also see that the DisplayName as shown for AppInfo in the registry entry subkey as: @%systemroot%\system32\appinfo.dll,-100, and yet when you look in Services.msc, you find the display name to be 'Application Information'.
So, what I want to do programmatically is to figure out how to retrieve that information from within eac service dll, as specified in the path information contained in the DisplayName and Description subkeys of each service registry key.
Thank you SOOOOO much for helping me with this,
Bob Bone
[email protected]
Sam HobbsPosted Jan 1, 2010, 1:39 PM