You can get hard disk Id, Mac address, or processor ID as suggested. Some hard disk code examples
(setq ser (vla-get-Serialnumber (vlax-invoke (vlax-create-object "Scripting.FileSystemObject") 'getdrive "c:")))
; drive type 1 is a usb 2 hard disk
(defun UsbDriveSerialNumber ( / fso dr)
(setq fso (vlax-create-object "Scripting.FileSystemObject"))
(vlax-for d (vlax-get fso 'Drives)
(if
(= (Vlax-get d 'DriveType) 2)
(setq dr (cons (list (vla-get-path d) (vla-get-SerialNumber d)) dr)
)
)
)
(vlax-release-object fso)
(reverse dr)
)
(UsbDriveSerialNumber)
(vlax-for d (vlax-get fso 'Drives)
(princ (Vlax-get d 'DriveType) )
)
"Can i ask how it work?" Did you look at the lisp posted ?