Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 To: Shaheryar Rashed
  Where is Shaheryar Rashed?
 Multan
 Pakistan
 Shaheryar Rashed
 Tags
Subject: RE: Protection
Thread ID: 289062 Message ID: 289118 # Views: 40 # Ratings: 0
Version: Visual FoxPro 6 Category: Security and Application Protection
Date: Tuesday, December 28, 2010 1:56:49 PM         
   


> >
> >
> >
> > it's work in my application. u got any error there?
>
> i need hard disk sr. no. so i registered .OCX then i wrote your given code in a new prg file saved and Run but No result i got
>
> how will i get serial Number?? and how to add that sr. no in Main Prg
>
>
> i think in main.prg i should write
>
> If lcHddSrNo = "MyHDDSRNo"
> wait wind "ID Matched"
> Else
> quit
> Endif
>
> but how i know which is my hdd sr. no???

Perhpas this will work. Be aware that some manufacturers do not put their serial number in the same place as others.
LOCAL objWMI,colClass,objClass,strComputer
CREATE CURSOR PhysicalMedia (serialnumber c(100))
strComputer = "."
objWMI = GetObject("winmgmts:\\" +strComputer + "\root\cimv2")
colClass = objWMI.ExecQuery("Select * from Win32_PhysicalMedia",,48)

For Each objClass in colClass
 INSERT INTO PhysicalMedia (serialnumber) VALUES (objclass.serialnumber)
Next
BROWSE normal






Mike Gagnon
Refox XI +(English version)

ENTIRE THREAD

Protection Posted by SHAHERYAR RASHED @ 12/28/2010 8:08:21 AM
RE: Protection Posted by piyush Vaishnawswami @ 12/28/2010 8:24:48 AM
RE: Protection Posted by SHAHERYAR RASHED @ 12/28/2010 8:49:05 AM
RE: Protection Posted by piyush Vaishnawswami @ 12/28/2010 8:55:27 AM
RE: Protection Posted by SHAHERYAR RASHED @ 12/28/2010 9:08:11 AM
RE: Protection Posted by piyush Vaishnawswami @ 12/28/2010 9:10:24 AM
RE: Protection Posted by SHAHERYAR RASHED @ 12/28/2010 9:17:04 AM
RE: Protection Posted by piyush Vaishnawswami @ 12/28/2010 9:18:17 AM
RE: Protection Posted by SHAHERYAR RASHED @ 12/28/2010 9:26:38 AM
RE: Protection Posted by Samir H. @ 12/28/2010 10:44:22 AM
RE: Protection Posted by Mike Gagnon @ 12/28/2010 1:56:49 PM
RE: Protection Posted by Mike Gagnon @ 12/28/2010 2:03:13 PM
RE: Protection Posted by Jignesh Parekh @ 12/28/2010 2:09:03 PM
RE: Protection Posted by Jack Ryan @ 12/29/2010 8:20:01 PM