The following batch file is set up to modify a registry key under HKEY Current User:
regedit.exe /s \\beesley\software\visualregsitryfile\visual.reg.
If I run the batch file while logged into my Windows 7 computer, I get the UAC prompt (because I do not have administrative rights on my computer. I am the network admin and as a best practice I don't even give myself local admin rights) and I enter my network username and password. The script adds the registry values contained in the .reg file just fine. However, if I use this as a login script, when I log into the computer, the registry values are not added.
I believe a couple of things are causing the problem:
1.) The user is not a local administrator and even though the user can make changes to this particular key, they are prompted by the UAC to enter their username and password.
2.) I temporary gave myself admin rights to the computer and the login script still did not make the changes to the registry. Is this because you just cannot make a login script that will make changes to the HKEY current user registry?
This login script is being deployed as a login script in a group policy. I have already verified that the computer and user are in the OU that this Group Policy is being applied to and I also ran GPRESULT /R to make sure this group policy was listed and it was.
I am running Server 2008.
Thanks for your help.