Your best source of information and news about Vista hardware, windows and xp on the internet

Vista ARTICLES TOP 50 Spyware Virus Vista SOFT Vista HELP

services

You are currently browsing the articles from MS Windows Vista Compatible Software matching the category services.

Use C# to Find What Services are Running in a Process

Note: this content originally from 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? Can in be done in 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.

=================

Tasklist.exe with the /svc param can tell you, as can Process Explorer. You can also inspect the registry to determine what services would load with what SVCHOST group (see "Troubleshooting Performance Issues with Automatic Updates" for more details).

As far as C# code, the following requires a reference to 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.

using System;
using System.Management;

namespace MyGreenPaste
{
class Program
{
static void Main( string[] args )
{
if( args.GetLength( 0 ) <= 0 )
{
Console.WriteLine( "Usage: {0} pid",
System.IO.Path.GetFileName(
System.Diagnostics.Process.GetCurrentProcess().
MainModule.FileName ) );
Console.WriteLine( " where pid is the process id " +
"of a process hosting at least one service" );
return;
}

try
{
ManagementObjectSearcher mos =
new ManagementObjectSearcher( "root\\CIMV2",
string.Format( "SELECT * FROM Win32_Service " +
"where ProcessId={0}", args[0] ) );
foreach( ManagementObject result in mos.Get() )
{
Console.WriteLine( "{0} -> {1}", result["Name"],
result["DisplayName"] );
}
}
catch( ManagementException mex )
{
Console.WriteLine( "** Error querying WMI:{0}{1}",
System.Environment.NewLine, mex.Message );
}
}
}
}

Written by «/\/\Ø|ö±ò\/»®© on February 7th, 2008 with 1 comment.
Read more articles on Process Explorer and tasklist and WMI and SVCHOST and otherSoftware and c# and processes and services.

Where Did Web 2.0 Go?


Apparently web 2.0 has already hit and we are basking in its sunlight. Whilst this may be true, it feels more like a mild day and a few clouds have cleared. To be honest I think Web 2.0 received much more hype and attention than it ought to have. Don’t get me wrong, when I believe it has truly arrived I will be out on the deck chair basking in it I just don’t think we have quite gotten there yet. It’s hard to know whether some web adaptations have come about because of this web 2.0 or because of natural web evolution. After all, isn’t web 2.0 just that?

In terms of mainstream usage which affects practically everybody on the internet, I really don’t recall seeing that much come out of Web 2.0 other than RSS and different usages of tagging; seen in services like flickr, social bookmarking and media services like digg, del.icio.us etc. Then you have mybloglog, myspaces and other social network sites. These are all fantastic, I love and use all of these any many more. But, is that really it?

Tagging

Tagging has undoubtedly changed the way we view, navigate, consume and organise information over the internet from the original ‘hyperlinking concept’ Tim Berner’s Lee first delivered on.

“Hyperlinking was a concept published in July 1945, in an essay by Vannevar Bush called “As We May Think” The fact is Tim Berners-Lee was the first person too actually put the concept of hyperlinking to use. Tim Berners-Lee demonstrated the concept of hyperlinks in the very first web page.”

Traditionally you would find a site you like and bookmark the URL, allowing you to return to it at a later date. The more bookmarks you had, the harder became to find what you were looking for. One big hole here was obviously categorizing information to make it easier to find what you want. Folders just don’t cut it. Enter the present day, tagging is the new way of organising and categorising information. Just look at technorati, they currently index over 55 million blogs that are tagged, organised and categorised.

RSS Feeds

Really simple syndication feeds again changed the way users consumed information on the internet. Rather than having to go out and visit your favourite links to see if content had been updated, it was sent straight to you in your favourite RSS reader. This change is like getting the morning newspaper delivered to your door every morning. Only you get content you have subscribed to over the internet delivered to you whenever new content has been updated.

Gadgets

Gadgets seem to be all the hype now, Mac has had them for as long as I can remember, google sidebar has them, yahoo has them, Microsoft’s live service has them, Windows Vista has them. What’s the purpose of gadgets? To blur the line and distinction between the desktop and the internet. You might have an RSS gadget which allows you to get RSS feeds sent straight to your desktop. This brings the internet just that little bit closer to your desktop without having to open up a browser or RSS reader. Whilst not as popular, gadgets were around before the craziness of what everyone is coining web 2.0.

Greater connectivity and interfacing

Thanks to innovations like google and their google mail, calendar, notebook, reader, desktop and army of other google services we are starting to see much greater inter-connectivity between services. Use one account to connect to them all. Microsoft have finally gotten their act together in a similar fashion with their Live service. Though I believe google are playing more to their strengths and Microsoft simply see it as something they have to get into. I doubt Microsoft is going to be able to strong arm google in its current position though.

But where is the semantic web?

Around the time I first started hearing a lot about web 2.0 was when I was studying and working in the field of semantic web and ontology’s; writing intelligent agents that make use of semantic language and ontology’s to reason with each other and things in their domain. HTML is great for humans, it has been presenting information in a way that humans can make sense of it for years. But it means nothing to a computer. HTML does nothing to describe the type of data being presented. This was what XML was for. Plenty of white papers were written on the potential semantic markup could offer the internet and search engines but there hasn’t been much (to my knowledge) substance stem from it. Imagine how much more information would be available if the entire internet really was classified in taxonomies, nestled in ontology’s, relationships built through predicates, and searching capabilities extended to utilise this great power.

Web 2.0 has given us a new delivery system (RSS) and provided us with new ways to find and organise relevant information; through the use of tagging. Social media and bookmarking sites have mushroomed to create inter-connected communities and networks of people sharing knowledge and information. But where is my semantic web? Maybe semantic web was never going to be apart of the new generation of the internet; web 2.0.

Written by Joshua Hayes on February 11th, 2007 with no comments.
Read more articles on reader and feeds and services and ontologies and del icio us and bookmarking and social and tagging and semantic and Internet and Internet and Web and Web and google and myspace and digg and RSS.