Reputation: 573
I would like to make a simple windows installer to copy some files into the client's file system -that's all-. However, I would like to edit the main binary and insert the license code directly into it. Is there a way to do so from Innosetup? Sort like ....
sed -i 's/needle/replacement/g' targetfile
It is a Metatrader4 indicator.
Thank you!
Upvotes: 2
Views: 1336
Reputation: 24273
You can do a simple string replace on the installed executable using LoadStringFromFile()
, StringChange()
and SaveStringToFile()
.
Note that your needle and the replacement have to be the exact same length otherwise the executable will be corrupted.
Upvotes: 2