General
cancel
Showing results for 
Search instead for 
Did you mean: 

Login Script help to map a network drive on different server

Will Keddie
Occasional Visitor

Login Script help to map a network drive on different server

Hi,

Total newbie at this so please bear with me. Am currently using a simple batch file login script to map to a network drive.

The password for all users is the same (Rather cryptically it is password) which takes you on to a seperate server where the app has associated security levels and passwords, etc.

Can I edit this batch file to negate the need for users to type in passowrd. Can the script do this for me? If so, how?

Script below:

echo OFF
net use p: /d
CLS
net use p: \\school-admin.solgrid.local\mis /USER:solgrid\s206jsmith
cd "C:\Program Files\SIMS\SIMS .net\"
"C:\Program Files\SIMS\SIMS .net\SIMSLoad.exe" "C:\Program Files\SIMS\SIMS .net\Pulsar.exe"

Thanks for any help.
4 REPLIES
Muthukumar_5
Honored Contributor

Re: Login Script help to map a network drive on different server

It seems to be related with windows. Plz move to related forums.
Easy to suggest when don't know about the problem!
Jon Finley
Honored Contributor

Re: Login Script help to map a network drive on different server

Sure, just add the password on to the end of the "NET USE" command. i.e.:

net use p: \\school-admin.solgrid.local\mis /USER:solgrid\s206jsmith password

Jon
"Do or do not. There is no try!" - Yoda
Steven Clementi
Honored Contributor

Re: Login Script help to map a network drive on different server

Will:

Here are the options for the Net Use command...

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.


C:\>net use /?
The syntax of this command is:

NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[username@dotted domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]


You should be able to set the password...

net use p: \\school-admin.solgrid.local\mis /USER:solgrid\s206jsmith password

but it might take some fooling around with. These options are from XP and Windows 2003. Windows 2000 might be a little different.


Steven
Steven Clementi
HP Master ASE, Storage and Clustering
MCSE (NT 4.0, W2K, W2K3)
VCP (ESX2, Vi3, vSphere4, vSphere5)
RHCE
NPP3 (Nutanix Platform Professional)
Thomas Bianco
Honored Contributor

Re: Login Script help to map a network drive on different server

if the username and password match, simply omit the /user directive.

consider creating a domain. this will allow you to set up a single point of control for all passwords, and users can use their own account to connect to shares.
There have been Innumerable people who have helped me. Of course, I've managed to piss most of them off.