hard disk serial

G

Guest

Hi every one
I try to get hard disk serial number
how can i do this ?

-> THANK'S A LOT
 
M

Michel Claveau/Hamster

Hi !

For Windows :

from win32com.client import Dispatch
FSO = Dispatch('Scripting.FileSystemObject')
listDrives = FSO.Drives
for item in listDrives:
try:
print ' '
print 'Lettre du Drive :'+str(item.DriveLetter)
print 'Numéro de série :'+str(item.SerialNumber)
print 'Type de Drive :'+str(item.DriveType)
print 'Type format :'+str(item.FileSystem)
print 'Accès (prêt ?) :'+str(item.IsReady)
print 'Nom du volume :'+str(item.VolumeName)
print 'Nom de partage :'+str(item.ShareName)
print 'Path :'+str(item.Path)
print 'Dossier racine :'+str(item.RootFolder)
print 'Espace disponible:'+str(item.AvailableSpace)
print 'Espace libre :'+str(item.FreeSpace)
print 'Taille totale :'+str(item.TotalSize)
except:
print 'Pb avec ce disque'
 
G

Guest

THANK'S david !!!!
it's works very well !!

i feel like a student, but sometimes it's good !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top