I'm popping this in Scripts as the problem is being caused by a login script that I have working perfectly on three other setups but for some reason it wants nothing to do with me on this setup.
The only difference is that this server is an R2 version of Win2k3 and there seem to be some significant differences relating to the folder redirection and I'm guessing a security change somewhere too.
Anyway the script is attached... if someone could give it a look over and see if they can spot why it's getting this error:
Invalid root in registry key "HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\Shell Folders\Personal"
What I'm trying to do is setup a number of shares and get one of them to be the "My Documents" by default but it just doesn't want to stick.
This is with a client that has WinXPSP2.
Interestingly enough it seems that looking at the resultant policy wizard results.. the computer is NOT losing the My Documents redirect I tried at one point too... Deleting the initial policy seems to make lilttle difference.
Can anyone help this is driving me round the flippin bend!!
Looks like this error message gets thrown up when the reg key does not exist.
I am writing a script to verify that a registry key exists. The script works fine and gives me the information I need if the key exists, but if the key does not exists the script errors out on me. The error I get is INVALID ROOT IN REGISTRY KEY.
That would make sence, to the script it would look like simply be an unaccessible location and so would throw the error. You should be able to reset the permissions on that key to allow testing, just need to right click on the key in regedit and click permissions.
Turns out I f***ed up the permissions resets I did for the folders...
Small note for anyone else who finds themselves in this position.
- Remove inheritance
- Take ownership as administrator
- Add the profile user and give them full control
- THEN make them the owner for the folder..
DON'T... make them the owner and then give them full control... that somehow messes stuff up.
Right.. time to resolve the rest of these accounts...
Thanks all for your input.. this was one really throwing me out to lunch.
Missed this earlier... because I have a system for doing this stuff (which has worked to date).,.. plus I've tried using group policy and it still borks, falls over and kicks the baby out with the bath water.
This is weird... trying to figure out why one account works when the others don't is just nuts.
Whatever was causing the issue I just reached my limit.. I've taken ownership of the whole lot, shifted it to an OLD folder and then let the system recreate the accounts when they next login... If they need anything from the old profiles I can always copy/paste stuff in to their my docs folders... thankfully nothing massively important being held in there but damn if it wasn't a head scratcher..