HOW TO: Move Windows shares from one computer to another

While moving your Windows shares from one computer to another might seem pointless for most people, system administrators see great value in doing it efficiently. It is particularly useful in situations where we have to move data from an old server to new one, and we want our users to keep on accessing their files through the same virtual locations.
Let’s say you’ve got a brand new quad-core server running in your server room and need to move files from your old Windows 2000 box to the new machine. First, be sure to create the same file system structure as on your other server (C, D, E, etc.). Then, just move (or restore) your files to the new server, making sure that files and directory permissions are transferred along with them.

If there was a directory named d:\users in the old system, the user directory must also be restored in the same drive on the new server.

Now that you’ve moved your files, start the registry editor and follow these simple steps:

(Warning: Serious problems might occur if you modify the registry incorrectly by using the registry editor or another method. These problems might require that you reinstall your operating system. Microsoft or I cannot guarantee that these problems can be solved. Modify the registry at your own risk.)

  1. Navigate to HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ LanmanServer \ Shares.
  2. Select the “shares” key and click files -> export. Save this file to the location of your choice.
  3. Do the same with the “security” sub key.
  4. Copy both files to the new machine.
  5. Log in into the new server and double click on the registry files you’ve just created (NOTE: You will lose all previously configured shares on the new system).
  6. Reboot the server, and voilà, the new shares should be there.

Now, the only thing that remains to be done is to modify your login script to point to the new server instead of the old one.

So, if your script contained something like:

NET USE M: \\oldserver\VOLUME1 /YES

Just change \\oldserver to \\newserver and your users won’t even notice their data moved.