As blogged here and mentioned in this discussion, you may get errors in a certain part of the AutoSPInstaller process if you run the script from within a user's folder (e.g. "My Documents" or C:\Users\username\Desktop\SP2010\). Best bet is to run from a commonly-accessible path such as C:\SP2010\AutoSPInstaller or even a UNC path like \\server\share\SP2010\AutoSPInstaller.

Cheers
Brian