?
Solved

Mapping drives with logon script.

Posted on 2004-09-09
4
Medium Priority
?
274 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
[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
4 Comments
 
LVL 10

Accepted Solution

by:
dis1931 earned 1500 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 96

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
Windows 10 Creator Update has just been released and I have it working very well on my laptop. Read below for issues, fixes and ideas.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
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…
Suggested Courses

765 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