HyperVista Posted January 31, 2008 Share Posted January 31, 2008 (edited) I want to reserve a data area within a script's exe, to define special variables (memory locations) within the exe that the script can read and write to, so that the script can update the variables and re-save itself as an .exe, such that the new values of these variables would be seen on subsequent execution(s) of the exe.How to do this? Edited January 31, 2008 by HyperVista Link to comment Share on other sites More sharing options...
JustinReno Posted January 31, 2008 Share Posted January 31, 2008 There is no simple or effecient way to do this. The only way I could think up was to FileInstall() the compiler within the executable and have it recompile the script and restart every time it needs to repack the variables. Link to comment Share on other sites More sharing options...
Achilles Posted January 31, 2008 Share Posted January 31, 2008 Why not just use a file to save your data, or the registry? Lots of program use the registry, and it's really easy to create an ini file in the @Temp directory with the necessary information... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
JustinReno Posted January 31, 2008 Share Posted January 31, 2008 Because it would be nice to only have to copy one file instead of two, and if (s)he used the registry, it would be harder to transport the variables to another computer. I was there was an easier way.. Link to comment Share on other sites More sharing options...
HyperVista Posted January 31, 2008 Author Share Posted January 31, 2008 Correct. Basically I want to execute a "use count" mechanism to determine how many times the script has been executed, without using a file or registry that can be tampered with. It would also allow the user to transfer the exe to another computer and still get credit for number of uses left. Another mechanism would be the date that the file was downloaded and provide an expiration date in combination with use count. To have this embedded within a compresses or obfuscated .exe would discourage piracy and avoid additional impact (registry and files) to the client's machine. After reviewing current responses, one possible strategy might be to identify how to make a "hole" in the exe, for example, a string of spaces someplace; disassemble the exe and identify the address within the exe of the "data area"; and then do a binary read/write of the exe within the script to get and update the information when needed. Link to comment Share on other sites More sharing options...
HyperVista Posted January 31, 2008 Author Share Posted January 31, 2008 (edited) Correct. Basically I want to execute a "use count" mechanism to determine how many times the script has been executed, without using a file or registry that can be tampered with. It would also allow the user to transfer the exe to another computer and still get credit for number of uses left. Another mechanism would be the date that the file was downloaded and provide an expiration date in combination with use count. To have this embedded within a compressed or obfuscated .exe would discourage piracy and avoid additional impact (registry and files) to the client's machine. After reviewing current responses, one possible strategy might be to identify how to make a "hole" in the exe, for example, a string of spaces someplace; disassemble the exe and identify the address within the exe of the "data area"; and then do a binary read/write of the exe within the script to get and update the information when needed. Any help from the AutoIT honchos with regard to executables, compression, or obfuscation relevant here would be appreciated. I think such an API would be useful, perhaps someone can think of a stronger solution. Thanks. (Sorry, there doesn't appear to be a way to delete posts you just made; so sorry for the duplication.) Edited January 31, 2008 by HyperVista Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now