I wrote some programs in Visual Foxpro, and I don't want others to use them illegally, so I incuded some codes that I took somewhere in internet to protect the programs.
Unfortunately, the codes only work for IDE Hardisk, not for SATA.
Would anyone please help me to give me some codes that work in SATA?
Here is the codes in VFP for IDE drive:

**** MAIN PROGRAM
...........................
DO HDSerialNumber

*** MAIN PROGRAM CONTINUE

FUNCTION HDSerialNumber
xWMI = getobject("winmgmts:")
xDisks = xWMI.InstancesOf("Win32_PhysicalMedia")
for each xDisk in xDisks
NoSeriHD=xDisk.SerialNumber
exit &&& Only the first Hardisk retrieved
NEXT
NoSeriHD=ALLTRIM(NoSeriHD)

IF NoSeriHd='xxxxxxxxxxxxx' && The Serial Number of 1st HD
RETURN &&& Program Continue
ENDI

***** IF Serial Number doesn't fit, then quit
QUIT