Solved

Slow, looking for drives?

Posted on 2006-06-27
36
658 Views
Last Modified: 2008-01-21
I've got a few laptop users who VPN into our network from remote locations. They also have a few network drives mapped. When they are not on VPN, the network drives are disconnected, and the machines are utterly slow, almost unbareable to use. And I believe it is because they are looking for the network drives, and attempting to reconnect. As soon as I manually removed those drives, the machine regained significant performance.

Now how is one to setup a machine properly with network drives that won't always be connected?
0
Comment
Question by:shankshank
  • 11
  • 8
  • 5
  • +3
36 Comments
 
LVL 30

Expert Comment

by:ded9
ID: 16992751
Right click the connection from network connections  in control panel and disable it if network not being used.

Reps
0
 
LVL 5

Author Comment

by:shankshank
ID: 16992763
Disable what, the network connection?
0
 
LVL 5

Author Comment

by:shankshank
ID: 16992767
Like not the network drive but the action connection?
0
 
LVL 30

Expert Comment

by:ded9
ID: 16992826
yes the connection created  in network connections
0
 
LVL 5

Author Comment

by:shankshank
ID: 16992900
There is no connection there, except local area network which gets used

0
 
LVL 30

Expert Comment

by:ded9
ID: 16993100
0
 
LVL 5

Accepted Solution

by:
VortexAdmin earned 168 total points
ID: 16993287
Delete the drive mappings from the clients and map them in a login script on the server when they log in.  
0
 
LVL 87

Expert Comment

by:rindi
ID: 16993400
Appart from using a login script like mentioned above, also make sure there are no links on the desktop pointing to files on such remote mappings.
0
 
LVL 5

Author Comment

by:shankshank
ID: 16993631
rindi: that we have verified, learned the hard way from the past.

vortex: They are mapped through logon scripts, but of course we may need to implement log off scripts? how are others in corp enviornments doing this?

i use cisco vpn client, can that initiate a logoffscript built in?
0
 
LVL 5

Expert Comment

by:VortexAdmin
ID: 16996455
Don't know about a logoff script but you could certainly put it in a batch file on their desktop simply enough.
0
 
LVL 87

Expert Comment

by:rindi
ID: 16996509
If the users logoff before disconnecting the VPN connection, that should be as good as a logoff script. They just shouldn't go into hibernation or standby mode when they are connected to the lan. It is allways better to shutdown the system.
0
 
LVL 5

Expert Comment

by:VortexAdmin
ID: 16996553
They would have to logoff Windows as well and log back in. I would think a batch file would be easier.  I don't think logging out of the Cisco client would disconnect the drives, otherwise he wouldn't be having this problem.
0
 
LVL 6

Expert Comment

by:engineer_dell
ID: 16996710
Hello ShankShank,

I really wish if MicroSoft sees this forum and does something for such issues :) You are right ! Windows has a bad habit of searching network links and folders at the start-up, BUT you can change it,

Open My Computer > Click tools > Click Folder Option > Click View Tab > Under Advance Settings :-
Uncheck "Automatically Serach for Network Folders & Printers" option.
> Click Apply and close.

You should also delete not required Mapped Drives; And for those Mapped drives that are required - turn off the option "Reconnect at Logon".
This would help your machine to boot faster.

Regards,

Engineer_Dell

0
 
LVL 5

Expert Comment

by:VortexAdmin
ID: 16998185
That's not the issue, the issue is after disconnecting from a VPN session not when booting.  He has already removed other network links and only has his scripted drives to deal with.  I think unless you wanted to get into 3rd party software, the batch file with the net use /d commands is your best method.  It's also a very simple solution.

0
 
LVL 5

Author Comment

by:shankshank
ID: 17000495
Thanks for all the responses.

True the batch file with net use commands removing the network drives is 100% accurate in working, but that is just too much for the user. A user oon the go doesn't want to have to remmeber to do such things, and I'd hate for the user to remember these little tidbits.

When a user logs on the cisco vpn, yes, they get the logon script, and when they close the vpn, no logout script. But here's another scenario, if that user comes to our office and accesses the network directly, they login to windows, login script runs, drives mapped. Then they logoff, drives are saved. They go home, login, drives are mapped.

Engineer_dell: The automatically search for network folders and printers option, what does that do when you uncheck it?

0
 
LVL 5

Author Comment

by:shankshank
ID: 17000651
Is there a way to tell windows not to query for reconnection of disconnected drives? Or is that what you have sent me engineer_dell
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 6

Expert Comment

by:engineer_dell
ID: 17001219
Yes, for more info,
http://support.microsoft.com/?kbid=320138
Another way is to create a GPO to disable this automatically for your XP clients, create a custom ADM,
"Enabled" the policy
Computer Configuration > Administrative Templates > Windows Components > Windows Explorer >
"Disable Automatically search for network folders and printers"

On a computer that this GPO applies to, the registry entry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoNetCrawling
is set to 1.

In Windows Explorer, Explorer, Tools, Folder Options, View, "Automatically search for network folders and printers" does not appear.

I think this is a good policy disabling the automatic search feature and users can not turn it on.

Regards,
Engineer_Dell
0
 
LVL 6

Expert Comment

by:engineer_dell
ID: 17001353
Here is the custom ADM file-
CLASS MACHINE ;This modifies the HKEY_LOCAL_MACHINE portion of the registry

CATEGORY !!WindowsComponents
CATEGORY !!WindowsExplorer
KEYNAME !!KeyMachinePoliciesExplorer
; allows turning on or off Explorer, Tools, Folder Options, View,
Automatically search for network folders and printers
POLICY !!PNoNetCrawling
EXPLAIN !!ENoNetCrawling
VALUENAME !!VNoNetCrawling
VALUEON NUMERIC 1
VALUEOFF NUMERIC 0
END POLICY

END CATEGORY
END CATEGORY
0
 
LVL 5

Author Comment

by:shankshank
ID: 17001367
I am confused if this searches for already mapped network dirves that are disconnected, all network drives/printers in the network, or both
0
 
LVL 6

Expert Comment

by:engineer_dell
ID: 17001403
; the following strings section assigns character strings
; to the variable names specified in the previous section
[strings]
WindowsComponents="Windows Components"
WindowsExplorer="Windows Explorer"
KeyMachinePoliciesExplorer="SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer"
PNoNetCrawling="Disable Automatically search for network folders and
printers"
ENoNetCrawling="This policy controls whether Windows Explorer (when Windows Explorer window is open) will periodically search the network for new shared
folders and printers.\n\nIf this policy is Enabled, Windows Explorer, Tools, Folder Options, View, "Automatically search for network folders and printers" is not present and Windows Explorer behaves as there is no check mark (the automatic searching feature is Off).\n\nIf this policy is Disabled, Windows Explorer, Tools, Folder Options, View, "Automatically search for network folders and printers" does not display and Windows Explorer behaves as if the check mark is present (the automatic searching feature is On).\n\nIf this policy is Not Configured, the Windows Explorer, Tools, Folder Options, View, "Automatically search for network folders and printers" is displayed and a user can add or remove the check mark to turn this feature on or off. VNoNetCrawling="NoNetCrawling"
0
 
LVL 6

Expert Comment

by:engineer_dell
ID: 17001570
OK, Here is how it works,

If you disable "Automatic Search for Network folder and Printers" it will only stop searching for shared folders and printers. It WILL continue to search for mapped drives,

For Mapped drives you have 2 options, either you uncheck "Reconnect at logon" option for each mapped drive, OR
you select "Quick Logon" option as it doesn't connect mapped drives when you log on until you use the mapped drive, for more info on how to do it, read,
http://www.windowsnetworking.com/articles_tutorials/msnetreb.html

Regards,

Engineer_Dell
0
 
LVL 5

Expert Comment

by:VortexAdmin
ID: 17001582
In XP, when there is idle time Windows will search for shared printers and folders on your local network and add them to your Network Places.  That's why after time if you go into Network Places you'll see shortcuts to network shares that you didn't create.  I think this may already be disabled when you're part of a domain however.  

The problem is, you know you have a couple drives mapped that you need disconnected.  I would think double clicking a batch file right next to their VPN shortcut would be easy enough for any user that's capable of logging in through a VPN connection.  It will at least give you a temporary fix.  If you really wanted to get into it, you could write a script that tests whether the connection is still open and when it's not, it deletes the shares.  Possibly pinging an internal server.  This would take a little extra bandwidth with the pings but a single ping with very little data would do it.
0
 
LVL 16

Expert Comment

by:Nyaema
ID: 17002026
shankshank...

I don't know what commands are in you vpn logon script.

If it is the standard net use commands then make the drives not persistent
i.e. on log off, they are disconnected and don't appear at the next log in.

net use  f:  \\myserver\share  /persistent:no

On the local machine

The otherway is via a log in script.

save the following line in a cmd file (e.g disconnect.cmd) and save it in the folder c:\WINDOWS\System32\GroupPolicy\User\Scripts\Logoff

net use * /delete /y

open the group policy editor
start->run
gpedit.msc

Navigate to the following group policy
User Configuration-> Windows Settings->Scripts (Logon/Logoff)
Double click on logoff
Click on Add
select the batch file disconnect.cmd that use saved above and click ok.

For a domain the location of the batch file should be in
\\server\sysvol\epo.local\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\User\Scripts\Logoff
where {31B2F340-016D-11D2-945F-00C04FB984F9} is a guid for the defaul domain policy



The script should run everytime a user logs off
0
 
LVL 5

Author Comment

by:shankshank
ID: 17012916
nyaema:  

i got the backup script down. I don't have a set VPN logon script, it just runs the domain logon script when it connects.  If I put in the logon script as you say on the local machine, what if the GP logon script runs first, creates the network drive, then the net result is that the local logon script is going to cancel out the drive mapping to the network drive, right?
0
 
LVL 6

Assisted Solution

by:engineer_dell
engineer_dell earned 166 total points
ID: 17014268
Hello Shankshank,

Atlast, I have found a script which will automatically remove persistent and disconnected mapped drive,
http://www.ss64.com/wsh/drivemap.txt

http://www.ss64.com/nt/net_use.html
http://www.amset.info/loginscripts/network-drives.asp
http://www.microsoft.com/technet/archive/winntas/tips/techrep/logscrpt.mspx?mfr=true

Regards,

Engineer_Dell
0
 
LVL 16

Expert Comment

by:Nyaema
ID: 17015915
That's right shankshank,

You may want to add a line in the doman logon script that unmaps all drives
before connecting the required drives i.e.

net use * /delete /y
net use  f:  \\myserver\share  /persistent:no

With the above, what should happen is that all drives are disconnected
domain paths are then mapped in the next line.
Because they are not persitent, the mapped drives should be disconnected when the user logs off.

That should work.

If for some reason it doesn't
you can add a local script as discussed that disconnects all drives when the user logs off.
Then domain gp runs first.
I am guessing the  client computers are not part of the domain from which the vpn client runs its script.
If that's right then what I suggest should work.
0
 
LVL 5

Author Comment

by:shankshank
ID: 17017437
wait, what is the use of doing a net use command to delete drives if they aren't persistant?

0
 
LVL 5

Author Comment

by:shankshank
ID: 17017442
the confusion is that if the domain gp runs first, then a drive gets mapped, then the local script unmaps the drive. then we are stuck with no drives mapped
0
 
LVL 16

Assisted Solution

by:Nyaema
Nyaema earned 166 total points
ID: 17019622
There is not confusion shankshank :)

Remember the domain script is a logon script.
That means when you logs into the domain it runs

The local script is a log off script
That means when the user logs off it runs.  Because he doen't need the mapped drive after logging off.


The use of running a delete command when you have none persistent drive mappings.....?

To remove those drive mappings that were manually create or previously there but where persistent.
Of course if you like you can manually do it.
0
 
LVL 5

Author Comment

by:shankshank
ID: 17019639
Ah makes sense, then why does it have to be a local log off script, can it not be a part of the gp
0
 
LVL 16

Expert Comment

by:Nyaema
ID: 17019685
Local because your pcs are not in a domain...right

It would be nice if you could get the none persistent idea work then you may not need the local script.

0
 
LVL 6

Expert Comment

by:engineer_dell
ID: 17020369
I agree with Nyaema :)
0
 
LVL 6

Expert Comment

by:engineer_dell
ID: 17022932
How to map, delete,create a list and enumerate network drives using the Windows Script Host,
http://support.microsoft.com/kb/244676/en-us

Regards,
Engineer_Dell
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Just about everyone has an old PC laying around.  Ask anyone in the IT industry, whether they are a professional or play in it as a hobby.  From outdated Desktops to cheap "throwaway" laptops, they are all around and not as hard to "fix up" as you m…
I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

18 Experts available now in Live!

Get 1:1 Help Now