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
191 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
6 Comments
 
LVL 13

Accepted Solution

by:
StormITSolutions earned 250 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 13

Expert Comment

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

Storm
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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 24

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 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now