.bat for migrating mapped network drives?


  1. Posts : 7
    windows 7 professional 32 bit
       #1

    .bat for migrating mapped network drives?


    Can someone please provide a .bat file that will copy network shares on old computer and another .bat file to map those drives on new computer?

    Thank you
    Erik
      My Computer


  2. Posts : 784
    Linux Mint 17 Cinnamon | Win 7 Ult x64
       #2

    erik2282 said:
    Can someone please provide a .bat file that will copy network shares on old computer and another .bat file to map those drives on new computer?

    Thank you
    Erik
    Not sure if I'm understanding you correctly, but if you have a set of mapped drives on "old" computer and you want the same mapped drives on "new" computer you can do this by exporting the registry key

    HKEY_CURRENT_USER\NETWORK

    Which is where the mapped drive info is stored.

    You can copy the exported reg file via USB to the new computer and import it by double clicking the reg file.

    However, if you mean that you have a bunch of shares on "old" computer and you want to translate those to the corresponding map drive statements, that's a bit more complex.

    Shares are stored in HKEY_LOCAL_MACHINE\SYSTEM\Controlset001\Services\LanmanServer

    But to create such a bat file, you need also to extract the PC name (because it is required as the first part of the NET USE statement.

    If this is the scenario you are looking at how many shares are there to be exported? If only a few, it would be far quicker to just map them on the new computer.

    Just my two cents worth

    Tanya
      My Computer


  3. Posts : 7
    windows 7 professional 32 bit
    Thread Starter
       #3

    Thanks for the reply. So I do desktop support at a oil company and support about 150 users. We have several conference rooms that have their own workstations in them that the users log in to. Often users complain that they cant see their mapped drives when they log in. The thing is that, they wont be there, as there are no roaming profiles and the mapped drives are only local to their office computers. So I have been manually having to map drives for each user to different conference rooms. Some user have many map drives and it is very time consuming.

    So I'm at home now and can see this path in the registry on my PC and I can see my mapped drives that I have to my NAS. How do I export the registry key? and how do i import it to another PC?

    HKEY_CURRENT_USER\NETWORK
      My Computer


  4. Posts : 784
    Linux Mint 17 Cinnamon | Win 7 Ult x64
       #4

    erik2282 said:
    So I'm at home now and can see this path in the registry on my PC and I can see my mapped drives that I have to my NAS. How do I export the registry key? and how do i import it to another PC?

    HKEY_CURRENT_USER\NETWORK
    On the network key, right click and select Export. Type a file name (Eg maps.reg), and save the file to a USB drive or other removable device.

    Take that file to the other PC then simply double click the file and click Yes to to import it into the registry.

    I'd make sure each computer you import these settings to are the same OS. Don't try this on different versions of windows.

    And of course, it is always a good practice to create a system restore point or back up your registry before making modifications to the registry.

    Tanya
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:21.
Find Us