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
194 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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 25

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

785 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