Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: joe Degorio
  Where is joe Degorio?
 Tacloban City
 Philippines
 joe Degorio
 Tags
Subject: RE: Help Create Application for USB
Thread ID: 248579 Message ID: 248755 # Views: 6 # Ratings: 1
Version: Visual FoxPro 9 Category: Security and Application Protection
Date: Wednesday, December 23, 2009 1:07:37 AM         
   


> >
> >
> > As long as you have the VFP runtime files as M. Akram says and if you are using activex and registers it as Mike says, it will work. The only thing you needed to ensure is the path. To do that you can create a public or _screen variable which will hold the path and default directories read from a table or a text file; and you are on the go.
> >
> > Jun Tangunan
> > http://weblogs.foxite.com/sandstorm36/default.aspx
> > http://www.coderisland.com/forum/viewforum.php?f=10
>
> Hi Jun,
> I have my App running, there is one thing I need to ask, I want my app to run only to one usb drive...preventing it to have it copied to another flash drive...any ideas how can it be done?
>
> Thanks in advance,
> joe


Well you can implement a flash drive serial detection scheme. You can get the serial number of all hdd including a flash driv with this codes:

oWMi = getobject("winmgmts://")
col =  oWMI.ExecQuery("Select * from win32_diskdrive")
for each disk in col
     ?disk.PNPDeviceID 
next


then save the serial of your flash drive inside a table or you can hardcode it in the project itself. Now when your user attempts to load your exe, perform again that one and compare the serial numbers to that of the saved serial number. If it is there, allow running of your program. If it is not, prevent running of your program. You can combine DRIVETYPE() native VFP function if you like, please read that in the help.

Jun Tangunan
http://weblogs.foxite.com/sandstorm36/default.aspx
http://www.coderisland.com/forum/viewforum.php?f=10

ENTIRE THREAD

Help Create Application for USB Posted by joe Degorio @ 12/21/2009 12:27:58 PM
RE: Help Create Application for USB Posted by M. Akram Bhatti @ 12/21/2009 12:31:32 PM
RE: Help Create Application for USB Posted by joe Degorio @ 12/22/2009 10:50:39 PM
RE: Help Create Application for USB Posted by Mike Gagnon @ 12/21/2009 12:35:36 PM
RE: Help Create Application for USB Posted by joe Degorio @ 12/22/2009 10:52:37 PM
RE: Help Create Application for USB Posted by Jun Tangunan @ 12/21/2009 3:47:20 PM
RE: Help Create Application for USB Posted by joe Degorio @ 12/22/2009 10:59:43 PM
RE: Help Create Application for USB Posted by Jun Tangunan @ 12/23/2009 1:07:37 AM
RE: Help Create Application for USB Posted by ho me @ 12/23/2009 3:02:50 PM
RE: Help Create Application for USB Posted by Rahul Moudgill @ 12/22/2009 11:04:38 AM
RE: Help Create Application for USB Posted by Boudewijn Lutgerink @ 12/26/2009 9:02:01 AM