WMI Programming with Visual Basic.NET: Combining with Windows Services (Page 1 of 5 )
In my previous article, part seven of this series, we looked at permanent subscribers to the WMI events. This article extends the concept of permanent subscribers to the Windows services level and integrates it with SQL Server database.
You can download the zip of entire Visual Studio.NET solution (developed for this article)
here.
Pre-requisites for this article
This article is bit advanced in its implementation of .NET technologies. It not only focuses on WMI, but also a bit on Windows Services and ADO.NET. To work with this article, you should be familiar with the concepts of Windows Services and implementations as well. I will not explain the concept (or architecture) of Windows Services in this article, as it is beyond the scope of this series. If you really don’t know what a Windows Service is and how to implement it in .NET, I request you not to work through this article until you become familiar with those concepts.
In general, if you are a beginner to .NET programming, certainly you should be working with ADO.NET to connect to databases. Since this article also uses ADO.NET as another technology, you should be familiar with this one as well. But somehow you can understand the code even if you don’t know ADO.NET, as I am working with only basics.
In brief, the goal of this article is to integrate WMI events with a Windows Service and get them logged into a database. I am quite sure that this article will be very helpful in debugging or monitoring a full-fledged Distributed Application Design. Not only that, this article would also help system administrators to audit almost all the activities of every host present in a network very easily.
You can also extend this article from Windows Services to Web Services (or even .NET Remoting), making the system monitoring available to being accessed through the Internet or even through mobile devices. You can further extend it to notify an administrator with an email, based on a particular event. Again, the sky is the limit for extending this article.
Another important issue is that, you should have understood all the issues of WMI events, which I discussed in part six and part seven of this series. If you don’t know understand the concept of a WMI event, I don’t think you can understand this article.
So, guys, let’s start joyfully.
Next: Designing and preparing the essentials >>
More Visual Basic.NET Articles
More By Jagadish Chaterjee