What I think you're accidentally doing is trying to replace the main half-life exe with your new autoexec.cfg file.
You should save the file as "C:\Sierra\Half-Life\esf\autoexec.cfg" , NOT, "C:\Sierra\Half-Life\hl.exe".
After the file is saved, try running esf again. If you get the same error as you started with, try deleting autoexec.cfg, only this time do not remake it.