Question

Im building an application that should consist of a single .exe file which in turn will be distributed by others. In this .exe file there is two hardcoded fields, username and password. The people who are going to distribute this do want the ability to update those fields and change the information.

I have absolutetly no clue how to do this. If there was a dll or config sure, just read them but then the information would be in plain text but there is no such files with the project. The only ones updating the .exe should be the people distributing the application so they are going to have to update and reupload the .exe i suppose but how?

Do I write a new application that somehow decompiles, updates the fields and recompiles it? Or is there a "usual" way of doing this that im not aware of? Or is the only way to go into source code, change the fields and compile a new .exe and replacing the old one?

edit Bad wording from me, its emailaddress and password for using in an smtp client, its hardcoded because the user dont choose which account to send the mail from.

Was it helpful?

Solution

Rather than hardcoding the information into the executable, it might make sense to still have an app.config file, but encrypt it, then provide a utility that would write the encrypted app.config with the specified information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top