Renaming protection

This is a discussion on Renaming protection within the Windows Programming forums, part of the Platform Specific Boards category; Hey guys, I'm having trouble figuring this out, I saw this .exe that if you renamed it would give you ...

  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
    Mad OnionKnight's Avatar
    Join Date
    Jan 2005
    Location
    Umeň, Sweden
    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, 02:56 AM
  3. copy protection for 16 bit DOS app
    By DRDOS in forum C Programming
    Replies: 2
    Last Post: 03-31-2006, 06:43 AM
  4. A general protection exception failure
    By louis_mine in forum C Programming
    Replies: 7
    Last Post: 11-25-2004, 01:22 AM
  5. General Protection Exception
    By s9uare in forum C++ Programming
    Replies: 1
    Last Post: 11-02-2002, 09:46 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21