Re: Scripting and the Registry
- From: RayRedSoxFan <RayRedSoxFan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 22 Aug 2005 16:49:06 -0700
Sorry, I just posted that function that relates to the registry. I can post
the whole login script, if you like. It's quite long though.
"Dave Patrick" wrote:
> I don't see that branch referenced in the function you posted.
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "RayRedSoxFan" wrote:
> | One more thing...the value that it keeps overwriting is in
> | HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default\MRU0
> |
> | Thanks
> |
> | "RayRedSoxFan" wrote:
> |
> | > 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=impersonate}!\\.\root\default:StdRegProv")
> | >
> | > sKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\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\Explorer\User
> Shell
> | > Folders"
> | > sEntryName = "Favorites"
> | > sStringValue = "U:\Documents and Settings\Favorites"
> | > oRegistry.SetStringValue HKEY_CURRENT_USER, sKeyPath, sEntryName,
> sStringValue
> | >
> | > sKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\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\Explorer\User
> Shell
> | > Folders"
> | > sEntryName = "Cookies"
> | > sStringValue = "U:\Documents and Settings\Cookies"
> | > oRegistry.SetStringValue HKEY_CURRENT_USER, sKeyPath, sEntryName,
> sStringValue
> | >
> | > sKeyPath = "Software\Microsoft\Windows\CurrentVersion\Explorer\User
> Shell
> | > Folders"
> | > sEntryName = "Recent"
> | > sStringValue = "U:\Documents and Settings\Recent"
> | > oRegistry.SetStringValue HKEY_CURRENT_USER, sKeyPath, sEntryName,
> sStringValue
> | >
> | > End Function
> | >
>
>
>
.
- Follow-Ups:
- Re: Scripting and the Registry
- From: Dave Patrick
- Re: Scripting and the Registry
- References:
- Scripting and the Registry
- From: RayRedSoxFan
- RE: Scripting and the Registry
- From: RayRedSoxFan
- Re: Scripting and the Registry
- From: Dave Patrick
- Scripting and the Registry
- Prev by Date: Re: Scripting and the Registry
- Next by Date: Re: Scripting and the Registry
- Previous by thread: Re: Scripting and the Registry
- Next by thread: Re: Scripting and the Registry
- Index(es):
Relevant Pages
|