1 Attachment(s)
EXE Writer - Make Custom EXEs
This question seems to get asked a lot, so I thought I'd post it here. It allows you to make "custom EXE files".
(This code is not a compiler).
You basically have 2 programs, one is your program, the other is one that customizes it. This is the same kind of concept used by installers, self extractors, etc.
It's hard to explain, so it's better if you look at the example projects.
The example is a simple login screen. You write the username/password to the EXE file itself (instead of having to distribute a password file or something with it).
No encryption was used in this example, so if you were to really make something like this then be sure to use encryption.
This is an updated version from one I posted about a year ago.
Re: EXE Writer - Make Custom EXEs
how does adding on to the exe not corrupt it? I mean isent there a checksum that it goes through to check if its the right size? kidna like when u hex a string?
Re: EXE Writer - Make Custom EXEs
Quote:
Originally Posted by AgentSmithers
how does adding on to the exe not corrupt it? I mean isent there a checksum that it goes through to check if its the right size? kidna like when u hex a string?
I don't really know exactly why, it's just the way the EXE file format is. It probably has an END code at the end, and anything past that point isn't executed. (Similiar to </html> in html), but I have no clue. :confused:
Re: EXE Writer - Make Custom EXEs
i am tryingto use your example but everytime i try to run it it give me a run time error 53 file not found. i have not added anything or modified it. can you tell me why?
Re: EXE Writer - Make Custom EXEs
Same thing happens to me ;) Exept in only says that on 'TheEXE' not the 'builder'
Re: EXE Writer - Make Custom EXEs
The way i would do it, since strings are stored as strings in vb exes, is open the exe, and edit a particular string.
Re: EXE Writer - Make Custom EXEs
Quote:
Originally Posted by LawnNinja
Same thing happens to me ;) Exept in only says that on 'TheEXE' not the 'builder'
Quote:
Originally Posted by wryan_garner4
i am tryingto use your example but everytime i try to run it it give me a run time error 53 file not found. i have not added anything or modified it. can you tell me why?
To both of you, I think i had roughly the same problem, if you just edit the name of the file that goes out, but leave the original project name the same it looks for TheEXE or the app.exename which is the vbp name, so make sure its the same.
Dont know if thats what your mean, but if it cant find something, then thats what i had
Re: EXE Writer - Make Custom EXEs
I've recently found a much easier/coder-friendly way of doing this using PropertyBags so I'll update the code soon.
And yes, Jazz is right, the code uses App.EXEName, which could be different than the name you choose as the EXE file.
If you already know the name of your EXE, change it in the TheEXE project.
ie:
VB Code:
Open App.Path & "\" & App.EXEName & ".exe"
to:
VB Code:
Open App.Path & "\My Name.exe"
Re: EXE Writer - Make Custom EXEs
Re: EXE Writer - Make Custom EXEs
I got a Sample as well if you need Clearafacation =)
It was Engenious!
Great way to make a Configuration for Client Server Apps!
Re: EXE Writer - Make Custom EXEs
i just downloaded your zipped file, and unzipped it, but how can i open it?
Re: EXE Writer - Make Custom EXEs
By opening Visual Basic 6/click on Existing, navigate to where you unzipped the project, and select the .vbp file.
Re: EXE Writer - Make Custom EXEs
In DOS days we use to hid small snippets of text in EXE files by giving the following command at DOS Prompt :
Code:
type mytext.txt >>mytest.exe
You found a windows way of doing it!
Great!
Re: EXE Writer - Make Custom EXEs
I knew this method. Its pretty old. But its not really good secure for like a login or something.. Now we just need to encrypt the stuff placed outside the headers of the file and decrypt it on runtime. Thats better. But another problem. Crackers can still crack it by using any debugger and just watch the strings chaning and the decrypted stuff. Maybe we need to keep it crypted and send stuff to my webserver mysql db with Request.php then check the db returned value = decrypt with the encrypted pass if output = letters and chars then acces to the program or something like that lol.
Hard to axplain.. But should be possible.
NiTrOwow