The solution is simple, run the following CMD command:
sqlcmd -S YOURSQLSERVER\INSTANCENAME -U YOURUSERNAME -P YOURPASSWORD -d YOURDATABASE -i "c:\somescript.sql"
Note that the parameters like -U and -P are case sensitive!
sqlcmd -S YOURSQLSERVER\INSTANCENAME -U YOURUSERNAME -P YOURPASSWORD -d YOURDATABASE -i "c:\somescript.sql"