Thread: Renaming protection

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    38

    Renaming protection

    Hey guys,

    I'm having trouble figuring this out, I saw this .exe that if you renamed it would give you an error. I tried to reproduce it but sadly it didn't work. I'm asking if anyone could point me out.

    Thanks a lot.

  2. #2
    Registered User OnionKnight's Avatar
    Join Date
    Jan 2005
    Posts
    555
    That's usually because the file has a lock on it for various reasons. There are tools like Unlocker which can be used to clear locks from a file.

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    38
    Thanks for the reply but I want to include that in my program. So if anyone knows how to do it, can you point me to somewhere.

  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Scranton, Pa
    Posts
    252
    Don't know why you'd want to do that, but you could always do something as simple as GetModuleFileName, lop off at the last \\, then append your desired executable name to it. Then compare that string to the original; if the executable's name doesn't match, send a PostQuitMessage().

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to add copy protection to a software?
    By h3ro in forum Tech Board
    Replies: 43
    Last Post: 09-07-2008, 07:09 PM
  2. C++ or C DRM Software protection developer
    By miles.spencer in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 12-08-2006, 03:56 AM
  3. copy protection for 16 bit DOS app
    By DRDOS in forum C Programming
    Replies: 2
    Last Post: 03-31-2006, 07:43 AM
  4. A general protection exception failure
    By louis_mine in forum C Programming
    Replies: 7
    Last Post: 11-25-2004, 02:22 AM
  5. General Protection Exception
    By s9uare in forum C++ Programming
    Replies: 1
    Last Post: 11-02-2002, 10:46 AM