Unanswered: How to retrieve SATA serial number in VFP
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
*** MAIN PROGRAM CONTINUE
xWMI = getobject("winmgmts:")
xDisks = xWMI.InstancesOf("Win32_PhysicalMedia")
for each xDisk in xDisks
exit &&& Only the first Hardisk retrieved
IF NoSeriHd='xxxxxxxxxxxxx' && The Serial Number of 1st HD
RETURN &&& Program Continue
***** IF Serial Number doesn't fit, then quit