If it doesn't matter what machine gets what name, just make a list of names in an INI file like this:

[Workstations]
WKSTA001=0
WKSTA002=0
WKSTA003=0
WKSTA004=0

The script should first check if it's name has been changed yet. It should check HKLM\Software\YourCompany'sName\NameChangeScript and whatever value. Something like "Changed" should be equal to 1. If it is, then the script quits, otherwise, it runs thought the INI file with READPROFILESTRING until it finds an entry with a 0. It should instantly update that entry to 1, and then save the name in the registry. Then it should go about the procedure of changing the machine name, and finally update its registry indicating that its name has indeed been changed via script.
-Steve O