Create a .bat / .cmd file, for example:
<nul SET /P "=123"> output.txt
Then replace 123 bytes of EF BB BF in your preferred HEX editor.
To edit this .bat / .cmd file later, you should not use Window Notepad.exe, because it converts BOM bytes to a question mark ( ? ) In the "Save as ASCII" mode (or, in the "Save as UTF-8" mode adds an unnecessary specification to the script file). Instead, you can use Notepad ++ with the "UTF-8 (witout BOM)" mode.
source share