Looks pretty clean to me. file.replace accepts regex patterns, which you could probably use to uncomment the line.
salt 'oldname' file.replace 'c:\salt\conf\minion' pattern='^[#]?id:.*$' repl='id: newname'
Untested, but, something along those lines...
You can also write a file to 'C:\salt\conf\minion.d\<myconfig.conf>' to store your config settings.
And if you changed the windows computer name, I'm pretty sure you can just remove/rename the minion_id file and restart the minion service. At least, on my own computer, I'm not seeing any other reference to the minion id anywhere, and this does regenerate the minion_id file.
-Loren