Registry edit via script
My company recently decided to change the location of a folder by moving it up one level. Now I have to go into the registry to update the update all of the strings to point to the new location. Is there a quick way to do this, hopefully via script so I can add it to the log in script?
The old location is \\fs1\engineering\standards and i need to change it to \\fs1\standards.
The old location is \\fs1\engineering\standards and i need to change it to \\fs1\standards.
Comments
-
Pash Member Posts: 1,600 ■■■■■□□□□□My company recently decided to change the location of a folder by moving it up one level. Now I have to go into the registry to update the update all of the strings to point to the new location. Is there a quick way to do this, hopefully via script so I can add it to the log in script?
The old location is \\fs1\engineering\standards and i need to change it to [URL="file://\\fs1\standards."]\\fs1\standards.[/URL]
Do you use vbs, kix, powershell etc?DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me. -
qwertyiop Member Posts: 725 ■■■□□□□□□□My log on scripts are batch files but if something works I should be able to call it from with my script
-
Claymoore Member Posts: 1,637Easiest way would be to export the values you wanted to change to a .reg file from within regedit (right-click -- export). Then you can call regedit from a cmd file using REGEDIT /s [URL="file://\\server\share\export.reg"]\\server\share\export.reg[/URL]. The /s is for silent mode.
Pay attention to the permissions on the keys since your users probably won't be able to edit HKey_Local_Machine keys.