473,378 Members | 1,543 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,378 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 2260
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.