Previously when my autoexec.cfg file executed in CS:GO the line
Unknown command "?exec" appeared in the console.
When the script executes properly it will still show the unknown command line but it will be missing the “exec”. In order to fix this issue put a blank or commented out line for the first line in your autoexec.cfg.
Next, to have the file startup automatically add “exec autoexec.cfg” to the last line of the autoexec.cfg file and set the file to read only.