Windows Thread, Batch file to map network drive in Technical; I would like to create a batch file to map a Windows share as a network drive, and need to ...
22nd October 2009, 02:45 PM #1
Batch file to map network drive
I would like to create a batch file to map a Windows share as a network drive, and need to provide a set of login credentials and set it so 'Remember my password' is enabled.
Any way to do this through a batch file?
22nd October 2009, 02:49 PM #2
What kind of setup are you using?
My first thought would be the easiest thing it to make sure that the permissions on the share are set so that those people you want to access it can access it without having to input their credentials and then use the old:
net use <drive letter>: \\servername\pathtoshare
in a batch file and stick it in your startup folder or get it to run as a login script ..
I have a number of shares pushed out via login script (which also does a quick reset of the drive maps first just in case) on 2003R2, and shares such as staff ones are accessible to staff but not pupils etc, by using groups in the security
22nd October 2009, 03:02 PM #3
net use would work for anyone logged in and use those credentials, however the blurb about remember credentials.
Are you trying to map this network drive under a different account other than the logging in one? You can specify username to mount the drive.
net use Z: \\server\folder /user:user@domain (leave the password out to be prompted, however not entirely sure if you can have it remember the password, you could add the username and password in the key store application and associate it to net use?
Bit of google. Knew it was rundll32.exe keyMGR. However here is the command to open stored usernames and passwords:
Add a new username/password combo for the specified server and you should be golden.
Last edited by ahuxham; 22nd October 2009 at 03:06 PM.
22nd October 2009, 03:06 PM #4
The problem is we use Novell (i.e. no AD) so the share is on a standalone Windows 2003 Server.
Originally Posted by aptproductions
We use the share for some staff so they can write images etc to it, but now we have a new system in place where some staff need to view these photos but not modify anything in the shared folder.
So I was hoping to create the secondary 'read only' user and then stick a batch file on the network so staff can run it when they need to to map and store the network drive mapping with the correct user credentials stored.
22nd October 2009, 03:07 PM #5
Read my post
Originally Posted by googlemad
By cookie_monster in forum Scripts
Last Post: 12th October 2009, 10:02 PM
By buzzard in forum Scripts
Last Post: 13th August 2009, 04:45 PM
By onder in forum Windows Server 2000/2003
Last Post: 3rd March 2009, 12:37 PM
By new-2-this in forum How do you do....it?
Last Post: 17th July 2008, 08:57 PM
By Samson in forum Scripts
Last Post: 2nd July 2007, 09:34 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)