473,394 Members | 1,751 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Start/Stop windows service dependent on wmi

Pakmarshal
Hi,
I have developed a windows service which records the applications (processes) that runs on the machine.

To get the process start trigger i have used wmi.

Expand|Select|Wrap|Line Numbers
  1.  Obj_ManagementStartWatcher = New ManagementEventWatcher("Select * From Win32_ProcessStartTrace")
  2.   AddHandler mObj_ManagementStartWatcher.EventArrived, AddressOf Proces_Arrived
  3.    Obj_ManagementStartWatcher.Start()
what I have noticed that if my machine RAM is almost full. and at that time if i stop my service , then copy same exe (service exe) and paste it on the same location and start it again.
My service stop recieve the triggers from wmi.

Moreover, in that condition if i try to restart wmi service it does not restarts as well.

The behaviour continues till i restart my machine.

What idea or suggestion how can I avoid this malfunctioning.

Thanks and Regards,
Maverick.
Dec 20 '10 #1
0 1807

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

Similar topics

2
by: Vlad | last post by:
I have a windows service that spawns several threads. One of those threads may catch an exception that will require the whole service to shutdown. What is the proper way to do it? I did some search...
1
by: RK | last post by:
Hi Is there any way can we start the windows service after installation without the need for starting the service manually. I have StartType property set to "Automatic" for the service, but that...
2
by: Tobias Johansson | last post by:
Hello, I'm having what I believe a security problem to execute an executable file from a windows service in windows server 2003. It works fine in WIN XP SP2 The program(the service) itself...
3
by: SenthilVel | last post by:
Hi All i do need to control my windows services using aspx pages. I used the System.ServiceProcess.ServiceController namespace .... this is working fine when i run my code in a windows...
2
by: Li Pang | last post by:
I used the following code to manage IIS service Dim iis As New System.ServiceProcess.ServiceController("IIS Admin Service") If iis.Status() = ServiceProcess.ServiceControllerStatus.Stopped Then...
2
by: Nathan | last post by:
I have created a windows service but am having difficulties handling exceptions in the OnStart. What I want to do is if an exeception occurs during any of the code executed during the OnStart is...
1
by: 1Cajun | last post by:
I have an Administration form that I would like to use to not only set some variables for the service but also install and start and stop the service. I have created an install project and can...
1
by: schaf | last post by:
Hi all! I'm still trying to start/stop a service on a remote computer. (I promiss that's the last new post because of this problem from my side) My situation: I've an application running under...
4
by: graphicsxp | last post by:
Hi, I've written a windows service in vb.net, which works very well. The service is installed on my server, but now I would like to be able to start/stop it from any machine on the network. I...
3
by: Goran Djuranovic | last post by:
Hi all, I have a web app running on a local PC that can start and stop windows service on a remote machine, but only when I browse to it locally. If I browse to it from my other PC and try to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.