PC Review


Reply
Thread Tools Rate Thread

Drive Mapping Logon Script

 
 
Jim
Guest
Posts: n/a
 
      5th Nov 2003
I'm a computer tech for a non-profit organization. Our IS Staff is comprised
of 5 people that aren't even close to being experts. We just moved from a
workgroup setup to AD with multiple sites (one domain controller at each
site, one GC). We had help doing the initial setup but we've been running
into little problem after little problem since the switch (mostly permission
based). Making this switch has been no joke!

I'm trying to figure out how to make a logon script work that will map a
couple of drives automatically to our file server for our users. I read that
making a batch script like this will work (and it does when I manually run
it on a workstation):

net use z: /d>nul 2>&1
net use z: \\server\share /p:y

I don't know what the /d>nul 2>&1 does and I'm not completely clear about
the /persistance switch. I know that it works though (when ran manually).

I think my problem is setting it up in AD Users&Computers. I chose
properties of a user and go to the Profile tab. In the "Logon Script" field
I put the full path to the batch file. When I log onto the domain with that
account the drive does not get mapped. My goal is to map two drives to
different servers.

I'm really new in this area and I'd really appreciate some help.

Also, if there is a way to automatically set up a network printer (basic
\\server\printer type) in a logon batch file, that would rock!

Thanks!


 
Reply With Quote
 
 
 
 
Jerold Schulman
Guest
Posts: n/a
 
      5th Nov 2003
On Tue, 4 Nov 2003 20:53:48 -0700, "Jim" <(E-Mail Removed)> wrote:

>I'm a computer tech for a non-profit organization. Our IS Staff is comprised
>of 5 people that aren't even close to being experts. We just moved from a
>workgroup setup to AD with multiple sites (one domain controller at each
>site, one GC). We had help doing the initial setup but we've been running
>into little problem after little problem since the switch (mostly permission
>based). Making this switch has been no joke!
>
>I'm trying to figure out how to make a logon script work that will map a
>couple of drives automatically to our file server for our users. I read that
>making a batch script like this will work (and it does when I manually run
>it on a workstation):
>
>net use z: /d>nul 2>&1
>net use z: \\server\share /p:y
>
>I don't know what the /d>nul 2>&1 does and I'm not completely clear about
>the /persistance switch. I know that it works though (when ran manually).
>
>I think my problem is setting it up in AD Users&Computers. I chose
>properties of a user and go to the Profile tab. In the "Logon Script" field
>I put the full path to the batch file. When I log onto the domain with that
>account the drive does not get mapped. My goal is to map two drives to
>different servers.
>
>I'm really new in this area and I'd really appreciate some help.
>
>Also, if there is a way to automatically set up a network printer (basic
>\\server\printer type) in a logon batch file, that would rock!
>
>Thanks!
>

You place the script in the NETLOGON share, which is
C:\WINDOWS\sysvol\sysvol\<DomainName>\SCRIPTS

You configure the script path relative to this, so it is generally just
logon.bat

net use z: /d>nul 2>&1
deletes Z: and pipes any console responses and errors to nowhere

net use z: \\server\share /p:y

I don't see any need to make the share persistent. Use
net use z: \\server\share /p:n

See tip 2014 in the 'Tips & Tricks' at http://www.jsiinc.com

Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Reply With Quote
 
David Trimboli
Guest
Posts: n/a
 
      5th Nov 2003
"Jim" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...

> I think my problem is setting it up in AD Users&Computers. I chose
> properties of a user and go to the Profile tab. In the "Logon Script"

field
> I put the full path to the batch file. When I log onto the domain with

that
> account the drive does not get mapped. My goal is to map two drives to
> different servers.


In addition to what Jerold posted, I'd ask: are you sure the login script is
running? Try putting a PAUSE command at the end of the script; that'll keep
the window from closing as soon as the script is done. Then you can look at
the output of the script (unless you >NUL'd them out). Take out the >NUL's
for a bit to see if there are any errors.

Also, make sure you have access to the network shares you're trying to map.
You did mention security permission problems. You might be getting an
"access denied" type of message and not know it, because you're not watching
the script.

David
Stardate 3845.9


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logon script for different user/same mapping =?Utf-8?B?RGVyZWs=?= Microsoft Windows 2000 Active Directory 1 22nd Nov 2004 12:17 PM
Automatically Mapping A Drive Using A Logon Script - Win XP Home =?Utf-8?B?Q2FybG9zIE1hbGRvbmFkbw==?= Windows XP Security 1 14th Apr 2004 10:40 PM
Logon script not mapping drives Steele Microsoft Windows 2000 Group Policy 1 13th Feb 2004 10:39 PM
Mapping a network printer through logon script Sheldon Wolf Microsoft Windows 2000 Printing 0 10th Dec 2003 06:44 PM
Drive mapping on logon script problem Angel Martires Microsoft Windows 2000 Networking 0 19th Nov 2003 07:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:21 PM.