Solved

Mapping drives with logon script.

Posted on 2004-09-09
4
267 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

828 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