20 December 2010

Desktop Automation Pt4. The Corrections

Ok so if you've tried this series of scripts you might have noticed a slight error. Upon reboot the system can't find the mac addresses file and produces an error. Apologies for missing out this minor but very vital part.

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.

c:
@echo off
cd c:\postghost\hostname
call myhostnamescript.vbs

That call line needs to be changed to whatever you called your rename and join the domain script.