Well first thing is, writing to an exe file is most likely a violation of the program's EULA. Secondly you can't use /write because it appends a CRLF sequence, thirdly, if you are not the author of the exe, how are you going to know what to write and to where? Based on your comments here I'm going to assume you're not familiar with the internals of Windows executable files? And if you aren't, then why would you even try and mess with it?