Function for BIOS Date

Is there a function in visual basic that will return the BIOS/CMOS date?
eagle23Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

shivsaCommented:
There is a dos interrupt and a bios hardware interrupt.  Neither is accessible directly through VB.  You can do it in C.

You can write a fairly simple C.DLL with functions wrappers that can be called from VB.  What you need is Interrupt 1A, Function 03 to set the time, and function 05 to set the date.

for more information check this too.
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_10485918.html
mccainz2Commented:
As always Zarr's has an excellent answer.
http://www.zarr.net/vb/download/codedetail.asp?code=226

ANother approach would be to try the WIndows Management Instrumentaion scripting model ... I was actually poking around at the bios instrumentation when I read your post ... will post if I can extract the info from WMI ..
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

mccainz2Commented:
woohoo!!! getting closer to a pure WMI answer ...

feel free to play along if you like!

http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_bios.asp
mccainz2Commented:
getting closer but my bios object is returning all Nulls in its properties...
May post a question on this myself....

 Set objbios = GetObject("winmgmts:root\cimv2:win32_BIOS")
   
    If objbios Is Nothing Then
        MsgBox "No object returned"
    End If
   
    Debug.Print objbios.ReleaseDate
mccainz2Commented:
Victory!!! You have a little work on formatting the date but here it is!

    Set BIOSSet = GetObject("winmgmts:").InstancesOf("Win32_BIOS")
   
    For Each System In BIOSSet
       Debug.Print System.ReleaseDate
    Next
mccainz2Commented:
Addendum: I understand now why the earlier code was returning all Nulls... I was creating a proper Bios object but it wasnt initialized from the system , rather it was a virgin object thus all the Null values... I had to actually request an existing WMI object for the code to work.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
planoczCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
No response from eagle23 from 12/08/2003 comment
Award points to mccainz2 is recommend.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

planocz
EE Cleanup Volunteer
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.