No announcement yet.

Editing Remote Registries - How

  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Re: Editing Remote Registries - How

    Duh... Here's the syntax/command line for the tool:

    wscript.exe "C:\Scripts\Batches\Test Scripts\Launch Remote RegEdt32.vbs" //I //NoLogo %E%

    Just change the path to the vbs file.

    Hope this helps somebody out there!



    • #17
      Re: Editing Remote Registries - How

      Just one more note on this, then I'll leave well enough alone. After testing this in my actual network environment, using a different path for the regedt32.exe (a UNC or mapped drive, with spaces), the script would fail because it "cannot find specified file". Duh...

      Thanks must be made to Gunter Born (a scripting GOD!) for clearing this up.

      If you happen to do like I did, and put the older version of RegEdt32.exe in a common folder so admins can access it while running this script, and the path to the file contains spaces (and since the original file name does, this applies, too), change the following:

      ' run the specific regedt32, waiting for it to return
      WshShell.Run "c:\Scripts\regedt32.exe",3,True

      change this to:

      ' run the specific regedt32, waiting for it to return
      strCmdPath = "c:\Scripts and Stuff\regedt32.exe"
      WshShell.Run """" & strCmdPath & """",3,True

      the double quotes are the key.

      Sorry about the oversight!



      • #18
        Re: Editing Remote Registries - How

        I may be a moron, but I cannot locate reg.exe on the Windows NT Server Resource Kit...I was able to find it on the Windows 2000 Server Resource Kit, but it has the newer date that doesn't work. Can anyone send me the correct reg.exe file or point me in the right direction? Thx, Net


        • #19
          Re: Editing Remote Registries - How

          When you install the NT (4.0) Resource kit to your local workstation, it will create the "Program Files\rksupport" directory on your system partition.

          REG.EXE 4/19/98 94KB

          Date may off a bit, size may differ my a KB or 2.

          You can try a Google search for it, but it's not "supposed" to be out there like that.

          If this doesn't work, lemme know.



          • #20
            Re: Editing Remote Registries - How

            I am really late on this thread and it is old. I have followed everything to the T. I got it working with the original vbs script you put in Supply Guy. I tried the additional part incase I had a space in the path. I keep getting an error or StrCmd command. So it works for now with the regedit32.exe. I basicaly use a share point on the network. I copied the regedt32.exe from a windows 2000 machine. ( I use an XP workstation) I then entered this for my command line <span style="font-weight: bold">wscript.exe "\\vo-phx-fs05\scripts\hyenatools\scripts\LaunchRemoteRegEdt 32.vbs" //I //NoLogo %E%</span>
            Here is the vbs script in the same shared folder.
            <div class="ubbcode-block"><div class="ubbcode-header">Quote:</div><div class="ubbcode-body">'=========================================== ===============================
            ' VBScript Source File -- Created with SAPIEN Technologies PrimalSCRIPT(TM)
            ' NAME: Launch Remote RegEdt32.vbs
            ' AUTHOR: The Supply Guy (thesupplyguy26*nospamthanx*
            ' DATE : 11/10/2002
            ' COMMENT: Launch RegEdt32.exe (older version) from a specific location
            ' to open a remote registy
            '================================================= =========================
            Option Explicit

            Dim WshShell : Set WshShell = WScript.CreateObject("WScript.Shell")
            Dim objArgs, strTargetComp, Root, key1, key2, valname, sregval

            ' Initialize variables.
            Root = "HKCU"
            key1 = "\Software\Microsoft\RegEdt32"
            key2 = "settings"
            valname = "Registry"

            ' --- collect the argument sent ------------------
            Set objArgs = WScript.Arguments

            If objArgs.Count >= 1 Then
            strTargetComp = objArgs(0) ' assign the passed computer name to a variable
            Else ' quit the script, no variable given, or too many variables passed
            WScript.Echo("Could not determine the target computer's name, or too many arguments passed to the script. Quitting the script.")
            End If

            ' set the registry key
            WshShell.RegWrite Root & key1 & key2 & valname, strTargetComp, "REG_SZ"

            ' run the specific regedt32, waiting for it to return
            WshShell.Run "\\vo-phx-fs05\Scripts\hyenatools\scripts\regedit.exe",3,Tru e

            ' pause to give regedt32 time to close
            WScript.Sleep 2000

            ' delete the keys to reset
            WshShell.RegDelete Root & key1 & strTargetComp & ""
            WshShell.RegDelete Root & key1 & key2 & valname</div></div>

            I would love to be able to do the same thing with regedit.exe. I tried editing this one but had no luck. I really like the ability with XP's regedit. I simply drag a registry file into the regedit mmc and I am able to remotely merge a registry file.

            Thanks again.