Solved

Automatically Map Network Drives when logging into Wk3 server

Posted on 2004-09-12
5
235 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 57

Accepted Solution

by:
Pete Long earned 63 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 84

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 84

Assisted Solution

by:oBdA
oBdA earned 62 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to run the DNS query from the server? 5 90
Group Policy & Netlogin Services 5 63
Active Directory - Error 8614 - Do all DC's need to replicate 5 112
ticket bloat 3 81
So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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