Re: Scripting and the Registry



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
> | >
>
>
>
.



Relevant Pages

  • Re: Scripting and the Registry
    ... Folders" ... sStringValue ... > |> Someone wrote a login script for our network long before I joined my ...
    (microsoft.public.windows.server.scripting)
  • Re: Scripting and the Registry
    ... The entry in the Registry that keeps getting reset ... > sStringValue ...
    (microsoft.public.windows.server.scripting)
  • Re: Home folder not mapping in XP
    ... Do you have a login script or just using AD to assign the home directory? ... I just setup 2 people at my company with 2 new laptops. ... > Directory or with permissions set on those folders. ... > denominator is that these 2 people received new WIn xp machines. ...
    (microsoft.public.windowsxp.network_web)
  • Re: Moving From ProTools to Linux? Good or bad?
    ... Another login script? ... time you open a new window) it will also run another script (probably ... called .cshrc or .profile depending on which shell you are using). ... C'est suisse, et tres, tres precis." ...
    (rec.audio.pro)
  • Script as login shell
    ... shell script as a login script for certain users. ... as I'm just dumping them to a shell eventually anyway just so ...
    (comp.unix.shell)