We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Disconnected Network Drive problem

morse57
morse57 asked
on
Medium Priority
2,419 Views
Last Modified: 2008-02-20
Hi folks

I've looked through lots of solutions for this problem and tried several but none seem to have worked.

Setup is a single SBS2003 server with XP Pro SP2 clients

If I run "net use S: \\servername\sharename" from any of our clients, they will all show drive S: correctly in the "My Computer" window.
With the same command in a logon script.bat for client machines, all clients' "My Computer" windows show the share as a "Disconnected Network Drive" immediately on logging on.  Double clicking the disconnected drive icon accesses the share correctly without any delay.

I have disabled the timeout on the server & removed old Network folders from all user profiles on the clients' registries, then let them be recreated & populated both to no avail.
Repopulated, the Network\S folder for the DefaultUser shows:
Connectiontype = 1
DeferFlags = 4
Provider: Microsoft Windows Network
ProviderType = 131072
RemotePath = correctly reported
UserName = \networkname\pcname$

Interestingly, the Network folder for CurrentUser is not recreated.

Can you help, please?
Comment
Watch Question

Commented:
Hi morse57,
> With the same command in a logon script.bat
 where did you place that logonscript?
make sure it's in the SBS_LOGIN_SCRIPT.bat file, this is located in \\servername\SYSVOL\yourdomain.local\scripts

the script should be like this:
net use g: \\servername\sharename /yes

make sure the drive letters are not used by any other drives like SDcard slots etc

Cheers!

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Commented:
SBS_LOGIN_SCRIPT.bat  is more easily found under \\servername\netlogon

Author

Commented:
Thanks

OK, working backwards from where I was, I've moved the MapNetworkDrive.bat from the SBS Client Computer\Computer Configuration\Windows Settings\Scripts\Logon setting of Group Policies to the SBS Client Computer\User Configuration\Windows Settings\Scripts\Logon setting, where it works fine.

The question I'm left with is, why does it connect but state it's disconnected for the computer setting in GP and not for the user setting.  Sorry but I like to understand these things to avoid future problems.

Cheers
Principal Consultant
CERTIFIED EXPERT
Most Valuable Expert 2016
Top Expert 2014
Commented:
First, you should not be editing the default GPOs.  That's never a good idea.  Instead, if you want to create a new policy, create a new GPO instead.  This way you don't break any of the SBS's defaults which you know to be working correctly.

That being said... you don't configure mapped drives with a GPO.  Instead, you need to modify the SBS_LOGIN_SCRIPT.bat file which suppsaws and Dinga84 have mentioned.  (found in \\servername\netlogon)

This file has a single line by default, which looks something like this:

\\SERVERNAME\Clients\Setup\setup.exe /s SERVERNAME

You can replace your current SBS_LOGIN_SCRIPT.bat with this code (after backing up the current one just in case):

@echo off
rem   ==================================================
rem
rem   Title: Login Script
rem   Author: Your Name
rem   Date: Self-explanatory
rem   Description: Network Login Script
rem
rem ==================================================

:SBS_SETUP
rem Default sbs2k3 client setup
\\SERVERNAME\Clients\Setup\setup.exe /s SERVERNAME

:MAPDRIVES
rem Connect network drives
if exist f:\*.* net use f: /d
net use f: \\ServerName\ShareName /persistent:no
if exist g:\*.* net use g: /d
net use g: \\ServerName\applications /persistent:no
if exist h:\*.* net use h: /d
net use h: \\ServerName\%username% /persistent:no

:PRINTERS
rem Connect network printers
net use lpt1: \\ServerName\Printer1ShareName /persistent:no
net use lpt2: \\ServerName\Printer2ShareName /persistent:no

:END



Be sure to put 'rem' at the beginning of any lines that you aren't using, for instance if you aren't using the Printer redirects, that section should read:
:PRINTERS
rem Connect network printers
rem net use lpt1: \\ServerName\Printer1ShareName /persistent:no
rem net use lpt2: \\ServerName\Printer2ShareName /persistent:no

It's better to keep the code in place though, just in case you want to use it later.

Jeff
TechSoEasy



Author

Commented:
Great, thanks Jeff.

I've made the change to SBS_LOGIN_SCRIPT.bat & undone the GP changes & it all works fine.

I presume that the "disconnected" problem on the client pc setting is just a quirk of SBS.

One final question before I put up the points, Jeff's script shows persistent = no, whereas suppsaws' version appears to be persistent = yes.  Pros & cons of either choice?

Cheers

Commented:
Its run every time at logon so it maps them each time, if it tires to map them and they are allready mapped some error message is displayed, cant recall what it is off the top of my head.
Jeffrey Kane - TechSoEasyPrincipal Consultant
CERTIFIED EXPERT
Most Valuable Expert 2016
Top Expert 2014

Commented:
The reason to use persistent = no is for what Dinga84 describes as well as so that any laptop that is out of the office doesn't try to connect to a non-existent share.

The disconnected problem is due to SBS's running of the login script, which could conflict with the timing of when group policies are applied.

Jeff
TechSoEasy

Author

Commented:
I see.

Thanks very much
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.