By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,628 Members | 1,880 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,628 IT Pros & Developers. It's quick & easy.

Windows Service stops triggering monitoring event for starting process

P: 28
I am developing a Windows Service Application in VB.net (using WMI). The application monitors for occurrence (Start) of any new event/ process in Win32 environment. The code which I am using for handling this monitoring event is as under:-

WithEvents Watcher As ManagementEventWatcher

Watcher = New ManagementEventWatcher(New WqlEventQuery("Select * From Win32_ProcessStartTrace"))

AddHandler Watcher.EventArrived,AddressOf ManagementWatcher_StartEventArrived

Watcher.Start()

The problem which I have been facing is that the application works fine in case of service installation/un-installation, begin and stop, at its first run i.e. systems startup but stops triggering monitoring event for starting processes, if we un-install and then again install and begin the service after span of some time (5-10 Mins). Moreover, the service is responding/triggering all remaining events, except the aforementioned monitoring event.

The odd behavior of the service will remain to continue until and unless I reboot my computer.

Please help me in this regard.
Sep 21 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.