Solved

Automatically Map Network Drives when logging into Wk3 server

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

757 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

19 Experts available now in Live!

Get 1:1 Help Now