Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Automatically Map Network Drives when logging into Wk3 server

Posted on 2004-09-12
5
Medium Priority
?
240 Views
Last Modified: 2010-04-19
How do I run my login.bat file automatically when my users login to the wk3 server?

LOGIN.BAT FILE ->

@echo off

net use /persistent:no
net use * /delete /y

echo username: %username%
echo computername: %computername%
echo os: %os%

net use f: \\server\shared
net use i: \\server\it
net use m: \\server\music
net use n: \\server\movies
net use o: \\server\cd images

net use lpt1 \\ws1\hp

exit
0
Comment
Question by:sf1elds
  • 2
3 Comments
 
LVL 57

Accepted Solution

by:
Pete Long earned 252 total points
ID: 12038398
Windows 2003 Creating and editing group policy

Group policies can be applied on a domain or an Organisational Unit, to apply a group policy in a 2003 domain environment, do the following.

On a domain controller open "Active directory Users and computers"

NOTE: As said above you can apply a GP to an OU in this instance we will deal with a domain GP, if you are concerned with a GP for an OU insert the "OU name" instead of the "Domain Name"

1. Locate the domain (top of the Tree) and right click it, then select "Properties"
2. Select the group policy Tab.
3. You will see the Default domain policy (and any other policies applied at this level)
4. You can create another domain policy by clicking "New" giving it a name and configuring it"
5. Ensure the default domain policy is highlighted and select "Edit" (unless you are working on another policy)
6. The Group policy object editor will open.
7. You can now edit the policy and close the editor when you are finished.
8. Back in the domain properties click "apply" and "OK"

Troubleshooting Group Policy in Windows Server 2003
http://www.microsoft.com/downloads/details.aspx?FamilyId=B24BF2D5-0D7A-4FC5-A14D-E91D211C21B2&displaylang=en

Group Policy Infrastructure White Paper
http://www.microsoft.com/downloads/details.aspx?FamilyId=D26E88BC-D445-4E8F-AA4E-B9C27061F7CA&displaylang=en

COMMON POLICIES

Logon Scripts

User Configuration > Windows Settings > Scripts > Logon
The script lives here (\\domain\sysvol\domain\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\User\Scripts\Logon)


0
 
LVL 85

Expert Comment

by:oBdA
ID: 12038598
Call me oldfashioned, I still prefer the logon script in the user's profile.
Simply enter the name of your script (no path) in the "Profile" tab in the user's properties (note that in W2k3, you can highlight and configure several users at once).
The script then goes into %Systemroot%\sysvol\sysvol\your.domain.local\scripts.
One word to this line in your script:
net use lpt1 \\ws1\hp
If you have XP workstations, this will only work if your users are local administrators of their machine. If your users are just users, use LPT2: instead.

Non-Administrators Cannot Remap an LPT Port to a Network Printer
http://support.microsoft.com/?kbid=313644
0
 
LVL 85

Assisted Solution

by:oBdA
oBdA earned 248 total points
ID: 12062516
sf1elds,
just found (more or less coincidentially, as I usually use oldlook) a comment in my "member feedback", that the logon script isn't working for you; you should stay in the question itself to enhance your chances of getting an answer ;)
So isn't the script running at all, is it failing to map the drives?
Try to add a "pause" command at the beginning and at the end of the script, so that you can see possible errormessages.

@echo off
echo Start of logon script ...
pause

net use /persistent:no
net use * /delete /y

echo username: %username%
echo computername: %computername%
echo os: %os%

net use f: \\server\shared
net use i: \\server\it
net use m: \\server\music
net use n: \\server\movies
net use o: \\server\cd images

net use lpt1 \\ws1\hp
echo End of logon script ...
pause
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Integration Management Part 2

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question