How to map Windows password protected network drive automatically on Windows machine
Windows Command :
net use x: \\server\share /USER:COMPUTER\User password
To connect/map any network drive automatically when you reboot your system, you need to put this command in BAT file and run it with startup.
- Create mapDrive.bat file
@echo off :: Delete already connected drive. (In case you run this bat file after login ) net use X: /delete :: Now map/re-map network drive. ::COMMAND: net use x: \\server\share /USER:COMPUTER\User password net use X: \\192.168.1.1\SharedFolderName /USER:\username password ::net use X: \\192.168.1.1\SharedFolderName /USER:\domain\username password exit
- Now create shortcut in Startup folder.
- Click on Start -> All Programs -> Startup
- Right click on Startup and select "Open"
- C:\Users\<USER_NAME>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
- Right click on Right panel and select "Create Shortcut" option. (Available under "New" )
- Browse the location where you created mapDrive.bat and select it. Click OK->Next and Finish it.
- To test this is working properly, just reboot your system. Your network drive should be connected automatically after reboot.
Comments
Post a Comment