Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


April 11, 2001

Delays for Remote Terminal Services Users


RSS
Subscribe to Windows IT Pro | See More Windows 2000 Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

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.

End of Article



Reader Comments
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.

Anonymous User November 07, 2004 (Article Rating: )


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Windows, Unix, Linux Interoperability

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement