1 Replies - 190 Views - Last Post: 31 July 2019 - 06:56 AM Rate Topic: -----

#1 [email protected]   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 91
  • Joined: 16-May 17

How to get only internal HDD details.... Please help me

Posted 31 July 2019 - 04:37 AM

How can I get internal HDD_DETLAIS = SerialNumber, Model, Manufacturer,TotalHeads ...... etc.
Please help me.. Now my problem is my code run ok, but when I insert external HDD or pen drive then showing the last counting device Details please help ....
i want to show only internal HHD device means OS loaded disk "C" drive
Thanks

Dim HDD_DETLAIS As String
      Dim HDD As New ManagementObjectSearcher("select * from Win32_DiskDrive")

      For Each HDDDET In HDD.Get
          HDD_DETLAIS = HDDDET("SerialNumber") + "   Model-" + HDDDET("Model") + "   Manufacturer-- " + HDDDET("Manufacturer") ' + "  TotalHeads  -  " + hd("TotalHeads") '+ "   Signature - " + hd("Signature")
          TextBox1.Text = HDD_DETLAIS

      Next


Is This A Good Question/Topic? 0
  • +

Replies To: How to get only internal HDD details.... Please help me

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15262
  • View blog
  • Posts: 61,177
  • Joined: 12-June 08

Re: How to get only internal HDD details.... Please help me

Posted 31 July 2019 - 06:56 AM

I would try looking at the 'my.computer.filesystem.drives' and see if the type changes for internal vs usb.

https://docs.microso...etframework-4.8
https://docs.microso...etframework-4.8
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1