Networking Forums

Networking Forums > Computer Networking > Windows Networking > Scripting and the Registry

Reply
Thread Tools Display Modes

Scripting and the Registry

 
 
RayRedSoxFan
Guest
Posts: n/a

 
      08-22-2005, 09:51 PM
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to identify ephemeral port range of Windows server2008 using registry keys? What are the new Registry keys? jhon Fernando Windows Networking 0 09-18-2008 12:28 AM
WZC scripting Thomas K Wireless Internet 0 08-24-2005 05:42 AM
tcpdump and scripting Matt Linux Networking 1 05-28-2005 10:50 PM
Problem scripting iwconfig can2002 Linux Networking 4 04-22-2005 11:41 PM
Scripting configuration entries? Eras Wireless Internet 5 01-21-2005 06:37 PM



1 2 3 4 5 6 7 8 9 10 11