Take the 2-minute tour ×  I want to make a MFC Application that
can only run form a know USB flash drive. It should not be run
if we copy to the other place. I found question something like
this at here But i don't really understand. Please show me a
hint.  share|improve this question Putting such a constraint on
a program seems weird to me. Could we know what you are trying
to achieve ? –  ereOn May 3 '12 at 6:34 I am trying to put the
application to an usb flash drive. It is just like plug and play
application. No need to install. But it should only be run form
certain usb drive. Just need to protect the application copying
form the usb and run form the everywhere. –  tpw May 3 '12 at
6:37 possible duplicate of Preventing copy protection
circumvention –  Bo Persson May 3 '12 at 6:42 @BoPersson, did
you copy the wrong link? That question is not a duplicate at
all. –  Mark Ransom May 3 '12 at 16:03  1 Answer 1  up vote 2
down vote accepted  In MFC: GetFileInformationByHandle  DWORD
dwSerialNumber = 0;  if(Get