.bat for migrating mapped network drives?

erik2282

New member
Local time
8:57 AM
Messages
7
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

OS
windows 7 professional 32 bit
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home Made
OS
Linux Mint 17 Cinnamon | Win 7 Ult x64
CPU
Intel I7-3770K @ 4.2ghz
Motherboard
ASRock Extreme 4
Memory
32GB G-Skill C10Q
Graphics Card(s)
EVGA GTX 670 2GB SC
Sound Card
Creative Fatality ExtremeGamer
Monitor(s) Displays
LG E2742V x 2
Screen Resolution
1920x1080
Hard Drives
256GB Vertex 4 SSD
2TB Seagate ST2000DM001
1TB Seagate ST1000DM003
PSU
Corsair HX 650
Case
HAF 932 advanced
Cooling
Corsair H100i liquid cooler
Keyboard
Logitech Wireless
Mouse
Logitech Wireless
Internet Speed
OptusNet NBN 100/40
Antivirus
Malwarebytes
Browser
Firefox 30
Other Info
Router: Sagemcom F@st 3846 Crippled by Optus.
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

OS
windows 7 professional 32 bit
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

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home Made
OS
Linux Mint 17 Cinnamon | Win 7 Ult x64
CPU
Intel I7-3770K @ 4.2ghz
Motherboard
ASRock Extreme 4
Memory
32GB G-Skill C10Q
Graphics Card(s)
EVGA GTX 670 2GB SC
Sound Card
Creative Fatality ExtremeGamer
Monitor(s) Displays
LG E2742V x 2
Screen Resolution
1920x1080
Hard Drives
256GB Vertex 4 SSD
2TB Seagate ST2000DM001
1TB Seagate ST1000DM003
PSU
Corsair HX 650
Case
HAF 932 advanced
Cooling
Corsair H100i liquid cooler
Keyboard
Logitech Wireless
Mouse
Logitech Wireless
Internet Speed
OptusNet NBN 100/40
Antivirus
Malwarebytes
Browser
Firefox 30
Other Info
Router: Sagemcom F@st 3846 Crippled by Optus.
Back
Top