The reason the script fails is that during execution the path is not set to the folder where the data files are. This is easily fixed with the following batch file. Copy this to a file and drop it into your C:\postghost folder. Save the file as hostname.bat then drag & drop this into the run-once tab of startup-cpl instead of the hostname.vbs file.
That call line needs to be changed to whatever you called your rename and join the domain script.