Quote Originally Posted by ajbritton View Post
I very much doubt that permissions on the folder you are redirecting to would prevent the script from writing to the registry.

If it's just the 'Shell Folders' key that is erroring out, you could try skipping it altogether. The Technet article here (Windows Confidential: The Sad Story of the Shell Folders Key) states that the 'Shell Folders' key is only there for compatibility reasons for a few bad apps.
In the hard light of the next day I think I ended up smooshing the permissions on the old accounts as tiredness and frustration overtook. Having nowhere quiet or undisturbed made things worse and had I realised I was in meltdown mode I'd have probably quit and gone home to avoid damage.

Thanks for the info on the shell folders, the script doesn't just set that but as I said, I have four schools I look after so changing the approach on one confuses later on if you're not careful so I prefer consistency... (Yeah, I know, I put R2 on here.. )

Anyway, whatever it was I think I just got overzealous and with only a small number of accounts I just recreated... One day I'll probably try an academic exercise to see if I can get it working on a VM machine but for now we're back and running.