Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Retrieve Bios Date and Time VB .net

Posted on 2003-03-29
4
Medium Priority
?
2,585 Views
Last Modified: 2008-02-01
How can i using a windows apllication made in VB .net access a pc's (in which the software is installed in) BIOS date and time and use it as a verification for a trial period of the application?
0
Comment
Question by:real_ashwin
4 Comments
 
LVL 28

Accepted Solution

by:
iboutchkine earned 75 total points
ID: 8230805
YOu can do it with WMI

'ref NET   System.Management

Public Class Form1
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "
#End Region

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strComputer As String = "."
        Dim objWMIService As Object = GetObject("winmgmts:" _
            & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
        Dim colBIOS As Object = objWMIService.ExecQuery _
            ("Select * from Win32_BIOS")
        Dim objBIOS As Object
        Dim msg As String
        Dim i As Integer

        For Each objBIOS In colBIOS
            msg &= "Build Number: " & objBIOS.BuildNumber & _
            " Name: " & objBIOS.Name & _
            " Release Date: " & objBIOS.ReleaseDate & _
            " Serial Number: " & objBIOS.SerialNumber & _
            " SMBIOS Version: " & objBIOS.SMBIOSBIOSVersion & _
            " SMBIOS Major Version: " & objBIOS.SMBIOSMajorVersion & _
            " SMBIOS Minor Version: " & objBIOS.SMBIOSMinorVersion & _
            " SMBIOS Present: " & objBIOS.SMBIOSPresent & _
            " Status: " & objBIOS.Status & _
            " Version: " & objBIOS.Version
            For i = 0 To UBound(objBIOS.BiosCharacteristics)
                msg &= " BIOS Characteristics: " & _
                    objBIOS.BiosCharacteristics(i) & vbCrLf
            Next
        Next
        MessageBox.Show(msg)
    End Sub
End Class
0
 
LVL 11

Expert Comment

by:rdrunner
ID: 8237696
Take a look at the activelock activeX Control

Just drop it on you Form and a few lines of code will allow you to even register and detect Date/Time changes

And best of all... Its free and open source

http://www.activelock.com

Here you go ;)

Hope this helps
0
 
LVL 1

Author Comment

by:real_ashwin
ID: 8318700
hi how can i share the points between the teo of you as i haven't had time at work to try them out and they both look correct thank you both.
0
 
LVL 1

Expert Comment

by:SeoYak
ID: 8355776
This is the Windows time, it is shorter and simpler and I doubt someone will change thier windows date/time to avoid purchasing a product.

Dim t As DateTime = Now
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
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 video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

577 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