[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

how to count the no of times  windows xp professional  booting in particular days using vb.net programme?

Posted on 2011-09-22
6
Medium Priority
?
205 Views
Last Modified: 2012-08-13
my os is win xp professional.
I want to wirte programme in vb.net.
how many number of times windows xp has shut down and  rebooted.
how to calculate this in vb.net.
0
Comment
Question by:tamilsoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Accepted Solution

by:
Allan Nisbet earned 1000 total points
ID: 36585982
You could achieve this quite simply using the number of boots as the pc must have shutdown for it to boot.

Create an application that is set to startup on pc boot
Add a textbox to the form, call it frmMain in this example

Under applications settings create a new setting called PCBOOT

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dim PCBoots as string

PCBoots = my.settings.PCBOOT
PCBoots = PCBoots + 1

My.Settings.PCBOOT = PCBoots
My.Settings.Save()
End Sub

Open in new window


This will increase the PCBoot count on a restart as the app only runs at pc startup

Hope this helps

I coded this from memory so might be some things needing declared in your Imports

Storm
0
 

Author Comment

by:tamilsoft
ID: 36586830
is there no option through windows registry ?
0
 
LVL 14

Expert Comment

by:Allan Nisbet
ID: 36587581
Not that I can think of off top of my head

Storm
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 10

Expert Comment

by:LMiller7
ID: 36590840
Other than running a VB program at bootup the only way I know would be to parse the system event log. Don't ask me how to do that. I am quite sure the information you want is not in the registry..
0
 
LVL 29

Expert Comment

by:Dr. Klahn
ID: 36592558
A simple and non-intrusive way could be to read the XP event logs for start and stop events.  This method can be implemented in VB.NET using the EventLog VB.NET class.

This method has the advantages that a) the time is as precise as possible, b) no changes need be made to the machine, c) it can be implemented over a network.
0
 
LVL 66

Assisted Solution

by:johnb6767
johnb6767 earned 1000 total points
ID: 36602159
"is there no option through windows registry ?"

No. Event Log is about the most accurate way....  (no points, just confirming the above...)
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question