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
189 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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 23

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Set form below another form 3 26
VB.Net - CSV to Oracle table 4 32
Get String split 5 33
Open a word document 23 18
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

746 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

14 Experts available now in Live!

Get 1:1 Help Now