Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: .bat for migrating mapped network drives?

21 Aug 2013   #1
erik2282

windows 7 professional 32 bit
 
 
.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 System SpecsSystem Spec
.

22 Aug 2013   #2
TanyaC

Linux Mint 17 Cinnamon | Win 7 Ult x64
 
 

Quote   Quote: Originally Posted by erik2282 View Post
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 System SpecsSystem Spec
24 Aug 2013   #3
erik2282

windows 7 professional 32 bit
 
 

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 System SpecsSystem Spec
.


24 Aug 2013   #4
TanyaC

Linux Mint 17 Cinnamon | Win 7 Ult x64
 
 

Quote   Quote: Originally Posted by erik2282 View Post
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 System SpecsSystem Spec
Reply

 .bat for migrating mapped network drives?




Thread Tools





Similar help and support threads
Thread Forum
Prevent executables from running on mapped network drives
Hi! In our company, we are using Windows 7 and my goal is to prevent users (also administrators) of specific workstations from running executables which are located on mapped network drives (servers). I tried different things (e.g. Software Restriction Policies or Applocker => in both cases I...
Network & Sharing
Mapped network drives, slower boot time
Long story short, I have shares on three PCs that are not always on. If I make a shortcut to the share and put it on my desktop, sometimes for some reason, the shortcut vanishes. I believe this is because I haven't connected the PC to the network in a while. So, I went about and mapped those...
Performance & Maintenance
mapped network drives without drive letters
I have the problem of a long list of redundant mapped network drives without drive letters, for example, documents, documents~1, documents~2, etc. all with same location...right clicking on the mapped does not present any "disconnect" option. Oh, they do not appear as mapped network drives under...
Network & Sharing
Manually mapped network drives
Hi All Hope you can help. I want to know if there is anyway to find out if a network shared drive (showing within 'My Computer') is manually connected/mapped. (btw we are using a AD - GPO & Desktop Authority) I don't want to disconnect all the drives and then log the user off as i want...
Network & Sharing
1 of 3 Mapped Network Drives not showing up
Windows Server 2008 R2 Windows 7 32 Bit I have a Windows 7 Enterprise box that when started will only create 2 of 3 mapped network drives. This does not happen every time either, just about 2-3 days of the 5 day work week. 2 of the drives are mapped via a script, while the 1 drive that is the...
Network & Sharing
Mapped network drives are lost
I have a problem with mapped network drives disconnecting. I run Win7 Pro connecting to Win Server 2003. Reboot and the drives are there. After a while a red cross appears against them in Explorer. I can usually see the contents, but running a program that requires those resources fails. The only...
Network & Sharing

Our Sites

Site Links

About Us

Find 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 11:00.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App