Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

April 11, 2001 12:00 AM

Delays for Remote Terminal Services Users

Windows IT Pro
InstantDoc ID #20633
Rating: (1)

Our Windows 2000 Server Service Pack 1 (SP1) machine runs Win2K Server Terminal Services in Application mode and Citrix MetaFrame 1.8 with SP2. When a Citrix client connects, the system tries to access the PC client's A drive. The system also tries to access the A drive each time a user opens My Computer or Windows Explorer. The delay that results is only a few seconds for our desktop users, who enjoy a high-speed connection. However, the delay is a problem for our remote users, who use laptops with rarely connected external A drives. Over a dial-up connection, the session can become locked up for several minutes when users log on or open Explorer. Any suggestions?

Two issues contribute to your problem. First, when users log on to a remote session, the system looks for the autoexec. file. The client drives are mapped, so the system checks those drives for the autoexec.bat file as well. If the A drive isn't connected or if no diskette is in the drive, the system can lock up as it tries to check for the file. Second, if the My Computer or Windows Explorer views are set to show details, the system scans drives for total size and free space information each time a user accesses them.

You can approach the drive-mapping problem a few different ways. First, you can prevent the system from parsing the autoexec.bat file. To do so, run regedt32.exe, open the registry key

HKEY_CURRENT_USER\SOFTWARE\Microsoft\WindowsNT\CurrentVersionWinlogin
\ParseAutoexec REG_SZ=1 and change its value from 1 to 0.

You can also run a batch command to delete the offending drive mapping on logon. Open the file %SystemRoot%\System32\UsrLogn2.Cmd and add the following line:

net use a: /d /y

This file runs before the user has access to the desktop and prevents the Explorer delay.

You can also prevent the drive from mapping by opening the registry key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersionPolicies\Explorer/NoDrives REG_DWORD=0 and changing the value from 0 to 1

A Better approach is to use a Win2K Group Policy Object (GPO) to hide the A drive. You can configure a policy to run before the OS comes up to disable A drive access from Explorer or My Computer while still allowing access to the drive from dialog boxes (e.g., the Save As dialog box) and from a command prompt. Open the Microsoft Management Console (MMC) Group Policy snap-in and navigate to User Configuration\Administrative Templates\Windows Components\Windows Explorer, where you'll find a policy to "Hide these specified drives in My Computer" and a policy to "Prevent Access to drives from My Computer." Seven default options restrict access to drives, but none of the options limit just A drive access. To limit A drive access, you can modify the default domain policy, System.adm.

To edit the default domain policy, use WordPad to open the System.adm file and search for NoDrives. You'll see the following:

        POLICY !!NoDrives
	EXPLAIN !!NoDrives_Help
		PART !!NoDrivesDropdown   DROPDOWNLIST NOSORT REQUIRED
			VALUENAME "NoDrives"
			ITEMLIST
				NAME !!ABOnly           VALUE NUMERIC 3
				NAME !!COnly            VALUE NUMERIC 4
				NAME !!DOnly            VALUE NUMERIC 8
				NAME !!ABConly          VALUE NUMERIC 7
				NAME !!ABCDOnly         VALUE NUMERIC 15
				NAME !!ALLDrives        VALUE NUMERIC 67108863 DEFAULT 
				         ; low 26 bits on (1 bit per drive)
				NAME !!RestNoDrives     VALUE NUMERIC 0
			END ITEMLIST
		END PART
	END POLICY
        POLICY !!NoViewOnDrive
		    EXPLAIN !!NoViewOnDrive_Help
			PART !!NoDrivesDropdown  DROPDOWNLIST NOSORT REQUIRED
			VALUENAME "NoViewOnDrive"
			ITEMLIST
			    NAME !!ABOnly           VALUE NUMERIC 3
				NAME !!COnly            VALUE NUMERIC 4
				NAME !!DOnly            VALUE NUMERIC 8
				NAME !!ABConly          VALUE NUMERIC 7
				NAME !!ABCDOnly         VALUE NUMERIC 15
				NAME !!ALLDrives        VALUE NUMERIC 67108863 DEFAULT 
				         ; low 26 bits on (1 bit per drive)
				NAME !!RestNoDrives     VALUE NUMERIC 0
			END ITEMLIST
		END PART
	END POLICY

The number that follows "VALUE NUMERIC" refers to the drives that the policy excludes. This value is a decimal number that corresponds to a 26-bit binary string, with each bit representing a drive.

A - 1 in the appropriate position in the string selects the drive, and a 0 doesn't. The value for just the A drive is 1, so you can add the following line to the Item list for the policy Above:

NAME !!AOnly           VALUE NUMERIC 1

Then scroll down to the Strings section and define the menu choice that will come up. For example,

[strings]
AOnly="Restrict A drive only"
ABCDOnly="Restrict A, B, C and D drives only"
ABConly="Restrict A, B and C drives only"
ABOnly="Restrict A and B drives only"
ALLDrives="Restrict all drives"
COnly="Restrict C drive only"
DOnly="Restrict D drive only"
RestNoDrives="Do not restrict drives" 

Close the system.adm file (save changes), and then open the Group Policy snap-in and choose your revised policy. The A drive won't map and your users won't experience the delay.

Related Content:

ARTICLE TOOLS

Comments
  • Anonymous User
    8 years ago
    Nov 07, 2004

    This is incorrect. You should not modify the system.adm file becuase future SP could replace it thus loosing any modifications that are made.

    You should create a seperate ADM file.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.