Fergieman, most likely the user that is running the scripts does not have the necessary permissions to import the registry keys as Glenn pointed out.