Results 1 to 13 of 13

Thread: How To Get Bios Info

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2005
    Posts
    17

    Exclamation How To Get Bios Info

    I'VE GOT CODE TO FIND BIOS INFO ON WIN XP.
    but that code is not working on win9x and 2000, too

  2. #2
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Re: How To Get Bios Info

    Can you post your code here?
    That might encourage people to try it and maybe find a solution for Win9x etc.

    DaveBo
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

  3. #3
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: How To Get Bios Info

    Curious:

    What sort of Bios info?

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  4. #4
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: How To Get Bios Info

    You may want to look into WMI, it comes nstalledwith Win2000 and above but, not with anything below, you'll have to check that they have it installed:

    VB Code:
    1. On Error Resume Next
    2. Computer = "."
    3. Set OutFile = CreateObject("WScript.Shell")
    4. Const ForAppending = 2
    5. Set FileSystem = CreateObject("Scripting.FileSystemObject")
    6. Set TextFile = FileSystem.OpenTextFile ("c:\Win32_BIOS.txt", ForAppending, True)
    7. TextFile.WriteLine
    8. Set WMIService = GetObject("winmgmts:\\" & Computer & "\root\cimv2")
    9. Set Items = WMIService.ExecQuery("Select * from Win32_BIOS",,48)
    10. For Each SubItems in Items
    11. TextFile.WriteLine "********************************************************************"
    12.     TextFile.WriteLine "BiosCharacteristics: " & SubItems.BiosCharacteristics
    13.     TextFile.WriteLine "BIOSVersion: " & SubItems.BIOSVersion
    14.     TextFile.WriteLine "BuildNumber: " & SubItems.BuildNumber
    15.     TextFile.WriteLine "Caption: " & SubItems.Caption
    16.     TextFile.WriteLine "CodeSet: " & SubItems.CodeSet
    17.     TextFile.WriteLine "CurrentLanguage: " & SubItems.CurrentLanguage
    18.     TextFile.WriteLine "Description: " & SubItems.Description
    19.     TextFile.WriteLine "IdentificationCode: " & SubItems.IdentificationCode
    20.     TextFile.WriteLine "InstallableLanguages: " & SubItems.InstallableLanguages
    21.     TextFile.WriteLine "InstallDate: " & SubItems.InstallDate
    22.     TextFile.WriteLine "LanguageEdition: " & SubItems.LanguageEdition
    23.     TextFile.WriteLine "ListOfLanguages: " & SubItems.ListOfLanguages
    24.     TextFile.WriteLine "Manufacturer: " & SubItems.Manufacturer
    25.     TextFile.WriteLine "Name: " & SubItems.Name
    26.     TextFile.WriteLine "OtherTargetOS: " & SubItems.OtherTargetOS
    27.     TextFile.WriteLine "PrimaryBIOS: " & SubItems.PrimaryBIOS
    28.     TextFile.WriteLine "ReleaseDate: " & SubItems.ReleaseDate
    29.     TextFile.WriteLine "SerialNumber: " & SubItems.SerialNumber
    30.     TextFile.WriteLine "SMBIOSBIOSVersion: " & SubItems.SMBIOSBIOSVersion
    31.     TextFile.WriteLine "SMBIOSMajorVersion: " & SubItems.SMBIOSMajorVersion
    32.     TextFile.WriteLine "SMBIOSMinorVersion: " & SubItems.SMBIOSMinorVersion
    33.     TextFile.WriteLine "SMBIOSPresent: " & SubItems.SMBIOSPresent
    34.     TextFile.WriteLine "SoftwareElementID: " & SubItems.SoftwareElementID
    35.     TextFile.WriteLine "SoftwareElementState: " & SubItems.SoftwareElementState
    36.     TextFile.WriteLine "Status: " & SubItems.Status
    37.     TextFile.WriteLine "TargetOperatingSystem: " & SubItems.TargetOperatingSystem
    38.     TextFile.WriteLine "Version: " & SubItems.Version
    39. TextFile.WriteLine "********************************************************************"
    40. Next
    41. TextFile.Close
    42. OutFile.Run "notepad.exe c:\Win32_BIOS.txt",1,True

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    May 2005
    Posts
    17

    Re: How To Get Bios Info

    Thanks!
    But i already know this code. but this does not work on win98.
    the bios serial no that is vital for me is returned as : 00000000

  6. #6
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: How To Get Bios Info

    Quote Originally Posted by arunendra
    Thanks!
    But i already know this code. but this does not work on win98.
    the bios serial no that is vital for me is returned as : 00000000

    It could be that WMI is not installed, I'll have to check on that.


    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    May 2005
    Posts
    17

    Re: How To Get Bios Info

    if the problem could be solved by installing WMI then
    how do i do it?
    will it work on 98 m/c , too?

  8. #8
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: How To Get Bios Info

    Quote Originally Posted by arunendra
    if the problem could be solved by installing WMI then
    how do i do it?
    will it work on 98 m/c , too?

    Yes WMI will work on Win98, I'm using Win98 and have WMI installed so, I suppose it must

    And you can get it from the MS Download center.

    Actually, on further inspection there is no need to have to install this on every computer you would use it on, you can simpley use the WMI Redistributable Components version 1.0

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  9. #9

    Thread Starter
    Junior Member
    Join Date
    May 2005
    Posts
    17

    Resolved Re: How To Get Bios Info

    thank you!
    i suppose this will work on 98 to get me the bios serial no!
    for the time being i'm usin the RESOLED symbol!

  10. #10
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: How To Get Bios Info

    To indicate that your question is answered, you should edit your first post and select the green checkmark as the post's icon.

    Thanks


    Has someone helped you? Then you can Rate their helpful post.

  11. #11
    Lively Member skv_noida's Avatar
    Join Date
    May 2005
    Location
    Noida, India
    Posts
    76

    Re: How To Get Bios Info

    hi there is a software api viewer using that you can do code on win 98 also

    Try this one

  12. #12

    Thread Starter
    Junior Member
    Join Date
    May 2005
    Posts
    17

    Re: How To Get Bios Info

    dear skv_noda!
    I think u have forgotten to post the Code!!!!!

  13. #13
    PowerPoster Keithuk's Avatar
    Join Date
    Jan 2004
    Location
    Staffordshire, England
    Posts
    2,236
    Keith

    I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width