Try this in cmd:
X: (your drive where csm is installed)
X:\cd Program Files\CSCOpx\bin
now, inside the folder run the script with the word perl before:
X:\Program Files\CSCOpx\bin>perl hostnamechange.pl -ohost OLDNAME -nhost NEWNAME -domain YOURDOMAIN.COM
X:\cd Program Files\CSCOpx\bin