Okay Brad I found the script I was talking about.

Please read this post and it should help you to achieve what you're wanting to do I think.


Removing old profiles with a script
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=161631



Note that my code removes the folders but not the data within the registry whereas the code from Christophe Melin addresses the registry.