Registry edit via script

qwertyiopqwertyiop Member Posts: 725 ■■■□□□□□□□
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.

Comments

  • PashPash Member Posts: 1,600 ■■■■■□□□□□
    qwertyiop wrote: »
    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.
  • qwertyiopqwertyiop 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
  • ClaymooreClaymoore Member Posts: 1,637
    Easiest 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.
Sign In or Register to comment.