Someone wrote a login script for our network long before I joined my current
company. One section of it looks like it grabs some settings from a somewhere
on the network (perhaps some copy of their registry stored on the network)
and copies it to the local registry for each user. The problem is, that for
one user, it's not correct and I want to change their version of the regitry
that it's copying from. If I change their local registry, and login as them,
it gets changed back after logging in. I'm assuming that the login script is
doing this.
Here is the section of the script dealing with this. How can I locate this
"master registry" or copy of their registry on the network?
Function UpdateLocalRegistry
Dim sComputer, sKeyPath, sEntryName, sDWORDValue, oRegistry, sStringValue
sComputer = "."
Set oRegistry =
GetObject("winmgmts:{impersonationLevel=impersonat e}!\\.\root\default:StdRegProv")
sKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explore r\User Shell
Folders"
sEntryName = "Personal"
sStringValue = "U:\Documents and Settings\My Documents"
oRegistry.SetStringValue HKEY_CURRENT_USER, sKeyPath, sEntryName, sStringValue
sKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explore r\User Shell
Folders"
sEntryName = "Favorites"
sStringValue = "U:\Documents and Settings\Favorites"
oRegistry.SetStringValue HKEY_CURRENT_USER, sKeyPath, sEntryName, sStringValue
sKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explore r\User Shell
Folders"
sEntryName = "My Pictures"
sStringValue = "U:\Documents and Settings\My Documents\My Pictures"
oRegistry.SetStringValue HKEY_CURRENT_USER, sKeyPath, sEntryName, sStringValue
sKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explore r\User Shell
Folders"
sEntryName = "Cookies"
sStringValue = "U:\Documents and Settings\Cookies"
oRegistry.SetStringValue HKEY_CURRENT_USER, sKeyPath, sEntryName, sStringValue
sKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explore r\User Shell
Folders"
sEntryName = "Recent"
sStringValue = "U:\Documents and Settings\Recent"
oRegistry.SetStringValue HKEY_CURRENT_USER, sKeyPath, sEntryName, sStringValue
End Function
|