salut, je cherche comment extraire le n° de serie du hardware (disc dur, ram...) en cherchant j'ai trouvé ceci ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;VxGetDriveInfos - Returns informations from the selected drive ; ; -- Function VxGetDriveInfos ; Returns informations from the selected drive. ; Copyright: ; ©2001 MENZI ENGINEERING GmbH, Switzerland ; Arguments [Typ]: ; Drv = Drive character, eg. "C" or "C:" [sTR] ; Return [Typ]: ; > Drive infos '(TotalSize FreeSpace DriveType FileSystem SerialNumber ; ShareName VolumeName) ; Explanations: ; - TotalSize (kB) [REAL] ; Returns the total space of a drive or network share. ; - FreeSpace (kB) [REAL] ; Returns the amount of space available to a user on the specified drive ; or network share. ; - DriveType [iNT] ; 0 = "Unknown" ; 1 = "Removable" ; 2 = "Fixed" ; 3 = "Network" ; 4 = "CD-ROM" ; 5 = "RAM Disk" ; - FileSystem [sTR] ; Returns the type of file system in use for the specified drive, eg. ; "FAT", "NTFS", "CDFS". ; - SerialNumber [iNT] ; Returns the serial number used to uniquely identify a disk volume. ; - ShareName [sTR] ; Returns the network share name (UNC) for the specified drive. If it's ; not a network drive, ShareName returns a zero-length string (""). ; - VolumeName [sTR] ; Returns the volume name of the specified drive. ; > 0 The drive doesn't exist. ; > -1 The drive is not ready. For removable-media drives and CD-ROM drives, ; VxGetDriveInfos returns -1 when the appropriate media is not inserted ; or not ready for access. ; Notes: ; - Requires ScrRun.dll (see also notes at top of page). ; ;DrvObj FilSys RetVal (defun Drvinfos (Drv / ) (setq FilSys (vlax-create-object "Scripting.FileSystemObject") RetVal (cond ((= (vlax-invoke FilSys 'DriveExists Drv) 0) 0) ((setq DrvObj (vlax-invoke FilSys 'GetDrive Drv)) (cond ((= (vlax-get DrvObj 'IsReady) 0) -1) ((list (/ (vlax-get DrvObj 'TotalSize) 1000.0) (/ (vlax-get DrvObj 'FreeSpace) 1000.0) (vlax-get DrvObj 'DriveType) (vlax-get DrvObj 'FileSystem) (vlax-get DrvObj 'SerialNumber) (vlax-get DrvObj 'ShareName) (vlax-get DrvObj 'VolumeName) ) ) ) ) ) ) (if DrvObj (vlax-release-object DrvObj)) (vlax-release-object FilSys) RetVal ) quand j'utilise cette fonction (drvinfos "c:") ça me donne un n° de série pour c mais quand je formate mon dd plus le même serial. ça veut dire quoi ? que c'est le n° de serie donné par windows ? sinon y-a t il d'autre moyen pour extraire le n° de série du matériel (inchangeant) je me demande si celà est possible. merci