dcsimg
Results 1 to 5 of 5

Thread: Get all hard disk firmware serial number.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2007
    Posts
    211

    Get all hard disk firmware serial number.

    Dear all expert programmers,
    I want to get hard disk firmware serial number and I found this code -> https://www.planet-source-code.com/v...42494&lngWId=1

    But show from IDE Hard Disk only. Please help me how to get SSD serial number.


    Thank you for all post.

  2. #2
    Lively Member
    Join Date
    Jun 2018
    Posts
    105

    Re: Get all hard disk firmware serial number.

    Hello,

    This is a quick answer and the simplest approach.
    You can simple use WMI to get it done.

    Name:  hdinfo.jpg
Views: 83
Size:  21.0 KB

    Name:  hdinfo2.jpg
Views: 80
Size:  11.7 KB

    * Find the attached batch file(s) in Disk info.zip.
    * Make its path changes as you wish in the batch files Or for testing Just create a Folder called Temp in your C: drive')
    * Then, Run the batch file with Administrative privilege (Right-click the batch and 'Run as administrator').

    * Filter information as you wish in your program or may be delete the file after getting the info.

    Note: If you need further information about the disk, just modify the batch file.
    Attached Files Attached Files

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2007
    Posts
    211

    Re: Get all hard disk firmware serial number.

    Quote Originally Posted by PGBSoft View Post
    Hello,

    This is a quick answer and the simplest approach.
    You can simple use WMI to get it done.

    Name:  hdinfo.jpg
Views: 83
Size:  21.0 KB

    Name:  hdinfo2.jpg
Views: 80
Size:  11.7 KB

    * Find the attached batch file(s) in Disk info.zip.
    * Make its path changes as you wish in the batch files Or for testing Just create a Folder called Temp in your C: drive')
    * Then, Run the batch file with Administrative privilege (Right-click the batch and 'Run as administrator').

    * Filter information as you wish in your program or may be delete the file after getting the info.

    Note: If you need further information about the disk, just modify the batch file.
    Thank you very much. But it isn't show any information.

  4. #4
    Hyperactive Member
    Join Date
    Jul 2007
    Location
    Essex, UK.
    Posts
    415

    Re: Get all hard disk firmware serial number.

    This gives the same results to the Debug window.

    Code:
    Private Sub Form_Load()
        Dim Results, Info
        Set Results = GetObject("Winmgmts:").ExecQuery("SELECT Manufacturer,FirmwareRevision,SerialNumber,Model FROM Win32_DiskDrive")
        For Each Info In Results
            Debug.Print Info.FirmwareRevision, Info.Manufacturer, Info.Model, Info.SerialNumber
        Next
    End Sub

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2007
    Posts
    211

    Re: Get all hard disk firmware serial number.

    Quote Originally Posted by Steve Grant View Post
    This gives the same results to the Debug window.

    Code:
    Private Sub Form_Load()
        Dim Results, Info
        Set Results = GetObject("Winmgmts:").ExecQuery("SELECT Manufacturer,FirmwareRevision,SerialNumber,Model FROM Win32_DiskDrive")
        For Each Info In Results
            Debug.Print Info.FirmwareRevision, Info.Manufacturer, Info.Model, Info.SerialNumber
        Next
    End Sub
    Thank you very much.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width