Jump to content

Recommended Posts

Posted

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?

Posted

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 : \\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

 

:cool:

Posted (edited)

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:

 

rundll32.exe keymgr.dll,KRShowKeyMgr

 

Add a new username/password combo for the specified server and you should be golden.

Edited by ahuxham
Posted
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 : \\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

 

:cool:

 

The problem is we use Novell (i.e. no AD) so the share is on a standalone Windows 2003 Server.

 

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. :doh:

 

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.

Posted
The problem is we use Novell (i.e. no AD) so the share is on a standalone Windows 2003 Server.

 

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. :doh:

 

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.

 

Read my post ;)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...