?
Solved

Retrieve Bios Date and Time VB .net

Posted on 2003-03-29
4
Medium Priority
?
2,491 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
[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
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

Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

Question has a verified solution.

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

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 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