Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using( ManagementClass driveClass = new ManagementClass( "Win32_DiskDrive" ) )
- {
- using( ManagementObjectCollection physicalDrives = driveClass.GetInstances( ) )
- {
- foreach( ManagementObject drive in physicalDrives )
- {
- string cylinders = ( string )drive["TotalCylinders"];
- // ... etc ...
- drive.Dispose( );
- }
- }
- }
Add Comment
Please, Sign In to add comment