Solved

Mapping drives with logon script.

Posted on 2004-09-09
4
263 Views
Last Modified: 2013-12-28
Every user on my network has a batch file the runs when the logon that maps drives.

Part of it is:

NET USE R: \\server1\path

I had to change the path but keep the same drive letter asssigned. So I edited the line in the batch file to

NET USE R: \\server2\path

Now pretty much no computer on the network will map this path at logon, Win9x or WinXP. I have to manually run the NET USE command to map it.

What is preventing the the mapping of this new path with the same drive?

Thanks.
0
Comment
Question by:ScottCL
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
dis1931 earned 500 total points
ID: 12016730
Try deleting the original drive mapping before re-mapping.  So do a net use /delete R: and then do the net use R: \\server2\path
0
 

Author Comment

by:ScottCL
ID: 12016901
Add that line in the logon script? Or just do it on computers with trouble?

We have Win9x and XP machines.
0
 
LVL 10

Expert Comment

by:dis1931
ID: 12017090
You can add it to the logon script.  All it will do is check if there is a R: drive if so it will delete it and then the next line can be used to map to R: drive which is now empty.  If it is already not present then it will display some text real quickly that will read:

"The network connection could not be found.

More help is available by typing NET HELPMSG 2250."

Then it will map the drive.  

First try it on a machine having trouble and see if it works.  If it does add it to the logon script.

Dis
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 12021716
I like to create logs in my login scripts.  Also, execute them from the command line manually to see what is happening.  Net use may work just fine, but run the script itself to see the results.

map z: to \\dc\netlogon
Then from a CMD prompt, type the login script name and watch what happens.

Make sure you have a significant buffer space in the CMD window so you can scroll up and see what's going on.

Make a test login script that's the same as the problem one.  Then redirect all output to files.  For example:

REM My Sample Login Script
@Echo Off
REM Connect to my group's share
ECHO Connect to my group's share > c:\loginscript.log
ECHO Checking for existing drive R: >> c:\loginscript.log
IF EXIST R:\ NET USE /DELETE R: 1>> c:\loginscript.log 2>>&1
NET USE R: \\SERVER\SHARE 1>> c:\loginscript.log 2>>&1
REM Start Monitoring Software
ECHO Starting Monitoring Software >> c:\loginscript.log
START MonitorSoftware 1>> c:\loginscript.log 2>>&1
REM End Script

The above sample will create a log explaining what's going on with every login.  You can then use Administrative shares to connect to the remote computers and check the log when problems occur.

0

Featured Post

Why do Marketing keep bothering you?

Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

Join & Write a Comment

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

744 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

13 Experts available now in Live!

Get 1:1 Help Now