Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
5.00/5 (3 votes)
See more:
I want to detect SSD drive and my program must first confirm detected drive is physical HDD or SSD.

I am trying with WMI in C#.

Please let me know if you have any idea.

Thanks in advance,

Neal.
Posted
Comments
Albert Holguin 11-Mar-11 10:11am    
I've had to work on a system that used HDDs and SSDs interchangeably and I can tell you this much... Windows doesn't know the difference! ...so any way you do it, its going to be based on a made up system you or someone else derives and will without a doubt lack consistency across drive manufacturers. Good luck!
neal123 11-Mar-11 14:39pm    
Yes, albert you are right at this point that windows doesn't know the difference between. So, I also came on same conclusion and as per WMI classes its returning ItnerfaceType property for disk drives. And I found different types of InterfaceType of SSD drives for different manufactureres.
Please check below link and interfaceType of every SSD drives.
http://ssd.allonthis.com/tag/interface-type/
I have also found MediaType but for both still I am not confident so, need more advice from experts.

My personal favorite: "Search for code that reports drive rotation speed. SSD should have 0rpm."
 
Share this answer
 
Comments
Harrison H 11-Mar-11 18:03pm    
Hahaha. Awesome!
Sergey Alexandrovich Kryukov 11-Mar-11 21:28pm    
Wow! I like this one!
--SA
El_Codero 5-Mar-12 18:11pm    
haha nice trick!5!
 
Share this answer
 
Comments
neal123 11-Mar-11 7:40am    
Sorry, No solution in that...
The best i found in other threads about WMI is looking for the name-model in win32_diskdrive and check if the model has "SSD" anywhere in the name.
Another way is to check the winsat-score of the disk using the win32_winsat-class.
 
Share this answer
 
Hope this[^] might help you.
 
Share this answer
 
Comments
neal123 11-Mar-11 7:39am    
Sorry, No solution in that...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900