Login Scipts

T

TC

Hello,

I'm looking to make a login script to map a drive because I'm getting
sick of map drive error while connected via Ethernet/Wireless.

I know the main part should be:

net use <Drive letter>: \\servername\sharename

But I am wondering if I need anything else.

Also, is there away to have it test IP address?

IE
If IP Address A or If IP Address B
Map drive
Else Do nothing?

i'm sure there is something on the net but I wasn't finding much that looked
trust worthy.

Thank you,

TC
 
R

Richard G. Harper

The NET USE command is all that you need to establish a connection. There
are options that you can specify - type NET USE /? in a command window to
see what they are.

Windows doesn't natively support either testing IP addresses or IF/ELSE
statements in batch files.

--
Richard G. Harper [MVP Shell/User] (e-mail address removed)
* PLEASE post all messages and replies in the newsgroups
* for the benefit of all. Private mail is usually not replied to.
* My website, such as it is ... http://rgharper.mvps.org/
* HELP us help YOU ... http://www.dts-l.org/goodpost.htm
 
K

Kristerpher Henderson

By testing IP address do you mean specify which computer should be mapping
ceratin drive. In that case you can use the %computer% command and specify
it that way.

I don't think you need anything besides what you have there. Unless you want
other functionality.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top