|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Command to add registry entryI would like to add a registry entry into every users HKCU registry. Is
that possible to do from a batch file? If so, what commands do I need to use? I need to add this registry key: HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations And then I need to create another key called Locations under that. Then I need to add a string with a value for it. Is this possible to do from a batch file? Thanks, Jasper Yes, absolutely. There are several ways that can be used. Start here:
How to add, modify, or delete registry subkeys and values by using a registration entries (.reg) file http://support.microsoft.com/kb/310516 Distributing Registry Changes http://technet.microsoft.com/en-us/library/bb727154.aspx John Jasper Recto wrote: Show quoteHide quote > I would like to add a registry entry into every users HKCU registry. Is > that possible to do from a batch file? > > > If so, what commands do I need to use? I need to add this registry key: > > HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Access\Security\Trusted > Locations > > And then I need to create another key called Locations under that. > Then I need to add a string with a value for it. > > Is this possible to do from a batch file? > > Thanks, > Jasper > >
Show quote
Hide quote
"Jasper Recto" <jrect***@yahoo.com> wrote in You can do this using the 'reg' command:news:eE7AeLVrJHA.2484@TK2MSFTNGP03.phx.gbl: > I would like to add a registry entry into every users HKCU > registry. Is that possible to do from a batch file? > > > If so, what commands do I need to use? I need to add this > registry key: > > HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Access\Security\Tr > usted Locations > > And then I need to create another key called Locations under that. > Then I need to add a string with a value for it. > > Is this possible to do from a batch file? > > Thanks, > Jasper > > reg add "HKCU\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations" reg add "HKCU\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations\Locations" reg add /v string "HKCU\ ... \Locations" /t REG_MULTI_SZ /d dataHere where, of course, "..." contains the rest of the path. HTH, John
Show quote
Hide quote
"John Wunderlich" <jwunderl***@lycos.com> wrote in message That works for the currently logged on user, but the OP wanted to do this to news:Xns9BD983B9914Dwunderpsdrscray@138.126.254.210... > "Jasper Recto" <jrect***@yahoo.com> wrote in > news:eE7AeLVrJHA.2484@TK2MSFTNGP03.phx.gbl: > >> I would like to add a registry entry into every users HKCU >> registry. Is that possible to do from a batch file? >> >> >> If so, what commands do I need to use? I need to add this >> registry key: >> >> HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Access\Security\Tr >> usted Locations >> >> And then I need to create another key called Locations under that. >> Then I need to add a string with a value for it. >> >> Is this possible to do from a batch file? >> >> Thanks, >> Jasper >> >> > > You can do this using the 'reg' command: > > reg add "HKCU\Software\Microsoft\Office\12.0\Access\Security\Trusted > Locations" > reg add "HKCU\Software\Microsoft\Office\12.0\Access\Security\Trusted > Locations\Locations" > reg add /v string "HKCU\ ... \Locations" /t REG_MULTI_SZ /d dataHere > > where, of course, "..." contains the rest of the path. "every users HKCU registry" - that doesn't sound like he wants each of them to do it for themselves. /Al
Show quote
Hide quote
"Al Dunbar" <aland***@hotmail.com> wrote in True... but if it's part of the login script, it will benews:uiYzv6arJHA.4996@TK2MSFTNGP04.phx.gbl: > > "John Wunderlich" <jwunderl***@lycos.com> wrote in message > news:Xns9BD983B9914Dwunderpsdrscray@138.126.254.210... >> "Jasper Recto" <jrect***@yahoo.com> wrote in >> news:eE7AeLVrJHA.2484@TK2MSFTNGP03.phx.gbl: >> >>> I would like to add a registry entry into every users HKCU >>> registry. Is that possible to do from a batch file? >>> >>> >>> If so, what commands do I need to use? I need to add this >>> registry key: >>> >>> HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Access\Security\ >>> Tr usted Locations >>> >>> And then I need to create another key called Locations under >>> that. Then I need to add a string with a value for it. >>> >>> Is this possible to do from a batch file? >>> >>> Thanks, >>> Jasper >>> >>> >> >> You can do this using the 'reg' command: >> >> reg add >> "HKCU\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations" reg add >> "HKCU\Software\Microsoft\Office\12.0\Access\Security\Trusted Locations\Locations" reg add /v string "HKCU\ ... \Locations" /t >> REG_MULTI_SZ /d dataHere >> >> where, of course, "..." contains the rest of the path. > > That works for the currently logged on user, but the OP wanted to > do this to "every users HKCU registry" - that doesn't sound like > he wants each of them to do it for themselves. > > /Al incorporated as each user logs in. -- John
Batch Script Text file parse
Drive Mapping in Server 2008 Schedule Defrag through GPO (non admin) Access protected folders using system account If syntax for numeric values SBS 2003 VB Scripting - Help Needed! help with logon vbs script Query OU for disabled computers Script AD remove all members groups OU Change Password |
|||||||||||||||||||||||