Hello! I downloaded a game called Brain Exercise with Dr.Kawashima. This game contains only one exe and no data files. However, the game can create saves. I wanted to ask how does it do that since it doesn't have any data files, just only the exe file?
-
It may be making saves in the Registry or somewhere under your %APPDATA% folder, or in your homedir's "My Documents" or "My Games" subfolders. Or anywhere else on your hard drive, for that matter. It is unlikely to be modifying its own exe to save, although I suppose that is possible (if a very bad idea: see AttackingHobo's comment below for a sample of the reasons why).
AttackingHobo : It is really really bad practice to even attempt to change the exe. First off you run into the problem of not being able to modify files that are open. Secondly after you have worked around that problem, if you are saving to exe and there is an error, or something crashes, you are going to have a corrupt game exe and users will be comfused.nhnb : And if it wants to communicates with the internet, some desktop firewalls will constantly ask again for permission because the checksum does not match.ojrac : I don't have data to back this up, but a self-editing .exe might even be interfered with by antivirus software. That said, Window's shadow copy service allows you to do some cool, somewhat non-intuitive things with locked files. http://en.wikipedia.org/wiki/Shadow_Copyeli : On Windows Vista or 7, elevated privileges are needed in order to modify files in the Program Files directory. It is reasonable to run an installer as admin, but running the executable as a normal user will not allow this type of modification. (Just strengthening AttackingHobo's comment.)From leander -
While it's perfectly possible to modify the executable (it's what viruses do all the time, and you can append whatever you want to an exe and read from the end of the file - not sure how windows user levels interfere with it, haven't done it since the golden days of MS-DOS) I'd indeed suspect the registry is used.
Copy the executable over an install on another system and see if it has your savegame, if it does you know it's the exe being modified.From Kaj
0 comments:
Post a Comment