473,545 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hard disk serial

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

-> THANK'S A LOT
Jul 18 '05 #1
2 6217
Hi !

For Windows :

from win32com.client import Dispatch
FSO = Dispatch('Scrip ting.FileSystem Object')
listDrives = FSO.Drives
for item in listDrives:
try:
print ' '
print 'Lettre du Drive :'+str(item.Dri veLetter)
print 'Numéro de série :'+str(item.Ser ialNumber)
print 'Type de Drive :'+str(item.Dri veType)
print 'Type format :'+str(item.Fil eSystem)
print 'Accès (prêt ?) :'+str(item.IsR eady)
print 'Nom du volume :'+str(item.Vol umeName)
print 'Nom de partage :'+str(item.Sha reName)
print 'Path :'+str(item.Pat h)
print 'Dossier racine :'+str(item.Roo tFolder)
print 'Espace disponible:'+st r(item.Availabl eSpace)
print 'Espace libre :'+str(item.Fre eSpace)
print 'Taille totale :'+str(item.Tot alSize)
except:
print 'Pb avec ce disque'

--
@-salutations
--
Michel Claveau
mél : http://cerbermail.com/?6J1TthIa8B
site : http://mclaveau.com
Jul 18 '05 #2
THANK'S david !!!!
it's works very well !!

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

<sb***@lexper t-auto.com> a écrit dans le message de news:
c8**********@s1 .read.news.olea ne.net...
Hi every one
I try to get hard disk serial number
how can i do this ?

-> THANK'S A LOT

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2393
by: Ahmed Essa | last post by:
hiiiiiiiiiii, i have aproblem in System.management namespace which use to get the serial number of hard disk. my problem is that when i run my application on windows2000 server it cause execption message called "invalid class", mainly the class called "ManagementObjectSearcher" which retrieve all hard disk information. thanks, ahmed3essa
3
2163
by: Arne Beruldsen | last post by:
How do you read the serial number to a hard drive? Thanks...Arne
3
9984
by: abeer el ashker | last post by:
how can i get serial numper of hard disk using api
14
28086
by: Lauren Wilson | last post by:
Discovered this interesting comment on MSDN: "To programmatically obtain the hard disk's serial number that the manufacturer assigns, use the Windows Management Instrumentation (WMI) Win32_PhysicalMedia (a class) property SerialNumber." I'm sorry to admit it bit I am really undereducated on how to incorporate some of the Windows SDK...
16
9502
by: Otie | last post by:
Hi, Is there a way for VB5 to determine exactly where on a hard drive a .exe file is stored upon the .exe file's first copying to the hard drive? What I need to know is the exact hard drive sector, cluster, partition, etc. information so I can use it later on to determine if the file was ever deleted and restored or moved elsewhere. ...
1
2295
by: alfred | last post by:
Hi How can I determine what the hard disk and or cpu's identification (serial no.) is. thanks Alfred
6
30693
by: Paul Bromley | last post by:
Ok - I have given up on trying to find the active IP address for a given PC. For licensing purposes I need to retrive a unique identifier from the PC that the program is installed on. The Hard disk serial number would do fine, but on Googling it seems that some of the sample code will now laways work on W2K, and not without administrator...
7
1734
by: Adele le Roux | last post by:
Hi All, How can I get the hard disk serial number of a remote computer's C:? The drive will NOT be mapped as a network drive. Thanks, Adele
0
1716
by: preethaAjayan | last post by:
Could anybody please help me with a piece of code to get hard disk's serial number using C#, not volume serial number, actual number that manufactures give to hard disks.
0
7473
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7408
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7815
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7763
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5976
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5340
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4949
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1891
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1020
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.