in a bat/cmd file or command prompt, you can get the computer name from the variable %computername%
echo %computername%
so you can build a script with that...does that help?
edit
also, if the script is alwasy being run on the same server, you don't need the computername anyway...you can just use the dot placeholder to reference the current server, i think
sqlcmd -S .\Inst -i C:\abc.sql
Lowell