Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Editing a .reg file

Status
Not open for further replies.

mizzy

IS-IT--Management
Jun 28, 2001
277
AU
Hi all,

I'm moving SOME shares from one server to another. Unfortunatley, the moved shares will also be on a new drive letter. (Both servers Windows 2003)

I thought, simple enough, I'll export the shares section of the registry (on the source server) and edit the resulting .reg file...removing the shares I don't need and changing location of the shares being moved. (pointing to the correct drive letter). Then import said .reg file to new server. Eh volia!

Unfortunatley when I open the reg file (using notepad) all I can see is HEX. I've come across a clunky solution but was wondering am I missing a trick...is there some sort of advanced editor for .reg files out there? converting the HEX to readable information which I can edit and save. I cannot find anything on the net.

Thanks in advance.
 
Instead of modifying the registry why don't you use SCOPY which will recreate your shares when copying files over.
 
Why not script it

Code:
'Disconnect mapeed drives to \\server1\share to
'\\serverNew\share Using the same drive letter
'Find All the Drives Mapped to a Share and Remap Them
Set objNetwork = CreateObject("Wscript.Network")
Set colDrives = objNetwork.EnumNetworkDrives

For i = 0 to colDrives.Count-1 Step 2
    If colDrives.Item(i + 1) = "\\server1\share" Then
        strDriveLetter = colDrives.Item(i)
        objNetwork.RemoveNetworkDrive strDriveLetter
        objNetwork.MapNetworkDrive strDriveLetter, "\\server2\share"
    End If
Next
 

Hi Guys,

Spoke to a few chaps here. Complete change of plan, using the move as an oppertunity to clean things up! Shares being zapped and recreated. It's is an interesting question though...btw I was going to use robocopy to move the data...I may have changed to scopy to sort it out.

Again thanks for your asistance especially the bit of vbcode.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top