Solved

Automatically Map Network Drives when logging into Wk3 server

Posted on 2004-09-12
5
233 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
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 83

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 83

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
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 video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

919 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now