Windows 7 Registry help and GPO

  • Thread starter Thread starter fireball1800
  • Start date Start date
F

fireball1800

Guest
I have created a login script file that updates the "login Script" in the GPO.

This script changes the keys in the registry during login to point to a new file server share.

This successfully updates the registry keys in the registry to the new location, however after logging in twice, and rebooting twice the GPedit.msc tool still shows the old location when I open it on the workstation.

I've done a search and replace of all the entries in the registry to the new location, but when opening the GPedit.msc tool and looking that the "login script" entry there, it shows the old.

OLD login script \\192.168.1.25\share\logon.bat is the old path to the login script. This is entered in the line in the GPedit.msc console originally.

New login script \\192.168.1.26\share\logon.bat is the new path to the login script.

In the batch file I run the following command

:gpupdate
regedit.exe /s \\192.168.1.26\share\LogOnScriptPath.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Logon\0\0]
"Script"="\\\\192.168.1.26\\share\\logon.bat"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Logon\1\0]
"Script"="\\\\192.168.1.26\\share\\logon.bat"

[HKEY_USERS\S-1-5-21-3102552752-417709957-33154223-669576\Software\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Logon\0\0]
"Script"="\\\\192.168.1.26\\share\\logon.bat"

[HKEY_USERS\S-1-5-21-3102552752-417709957-33154223-669576\Software\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Logon\1\0]
"Script"="\\\\192.168.1.26\\share\\logon.bat"

This successfully updates the registry without issue.. I can go into the registry using Regedit.exe and see all the updates were applied successfully...

I then open gpedit.msc and the line in the GPO login script still shows the old path.. \\192.168.1.25\share\logon.bat

no matter how many times I logoff / on or reboot this line never changes.. I've done a full search/scan of the registry and there are no entries with this old path..

Where is this path reading this entry from when GPedit.msc is openend.??? and how do I update it using the batch file?

More...
 
Back
Top