473,396 Members | 1,893 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,396 software developers and data experts.

Wmi event when the remote Host is booting up

Hi,

How can i get event for remote host is booting up,there is any wmi mechanism for the same.if not,what is the other procedure to get a event for remote host bootup/startup time .

Thanks in advance,

Regards,
Sakthi
Sep 16 '08 #1
5 2263
PRR
750 Expert 512MB
"How can i get event for remote host is booting up,there is any wmi mechanism for the same.if not,what is the other procedure to get a event for remote host bootup/startup time ."

Expand|Select|Wrap|Line Numbers
  1. using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(@"root\CIMV2\REMOTECOMPUTER NAME", "SELECT LastBootUpTime FROM Win32_OperatingSystem"))
  2.  
  3.                       {
  4.  
  5.                           foreach (ManagementObject queryObj in searcher.Get())
  6.  
  7.                           {
  8.  
  9.                               strRet = (Convert.ToString(queryObj["LastBootUpTime"]).Trim());
  10.  
  11.                           }
  12.  
  13.                       }
  14.  
  15.  
Sep 16 '08 #2
PRR
750 Expert 512MB
Check this thread too
Sep 16 '08 #3
Check this thread too
hi dirtbag.. from the code you posted ...i'll get the last bootup time after i connected to the particular host ..but i need to generate a event from remote host after boot up..
Sep 16 '08 #4
cloud255
427 Expert 256MB
Not exatly WMI, but you could write a tiny service which launches at startup on the host and contacts your app...
Sep 16 '08 #5
PRR
750 Expert 512MB
hi dirtbag.. from the code you posted ...i'll get the last bootup time after i connected to the particular host ..but i need to generate a event from remote host after boot up..
try what cloud255 said... do a service on local host and after start up connect to server/ application...
for remote connection usin WMI you also need to use:
ConnectionOption

i guess you will have to go with a service hosted on localpc .. which then communicates with the server on startup...
Sep 16 '08 #6

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

Similar topics

4
by: Greg Smith | last post by:
I have an old application that analyzes the data in the event log on one of our servers. I would like to convert it to C#. Does anybody know of any examples of reading the event log on a remote...
0
by: Johann Blake | last post by:
I am using the TcpClient to connect to a web site. I then open a NetworkStream and read the contents that are being sent back. The problem is that I have no idea when the remote host is finished...
9
by: Ollie | last post by:
okay sorry for cross posting but want to see if any one can explain the solution to this problem for me: I have a .Net ASP.Net app written in C# that use COM+ components to do some business...
3
by: Keith Free Ellis | last post by:
I'm having a problem with an asp.net web app after uploading to the remote server. It seems that most of the button event handlers are not firing. This occurs mostly in the form pages for editing...
4
by: cpptutor2000 | last post by:
Could some C guru help me please? I am using the following program to open a SSH connection to a remote host and eventually run a program on that remote host. #include <stdio.h> #include...
0
by: 124256 | last post by:
I'm developing a multi-player game in C#. Player A hosts a "game room" and creates a game object. Then players B and C gain remote access to that object over a TCP connection. (Assume everyone knows...
8
by: schaf | last post by:
Hi NG! I have a problem in my remote application. After calling a remote function the calculation will be done by the service. The calculation result will be sent to the caller (client) via...
1
by: malooga | last post by:
Hello, I'm having a problem connecting to DB2 on a remote iSeries host from a Linux server, both of which reside on my company's internal network. I'm using the IBM Linux Client V9.1. When I try...
12
by: sakthikumarb | last post by:
Hi , I need to monitor for Remote desktop connection is made for a particular host. There is any WMI event ?.if not how can monitor for remote desktop connection.. (Basically i need to generate...
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...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.