Common Client Drive Mapping Inquiries
Hotfix Rollup Pack 7 for XenApp 5 and Presentation Server 4.5 for Microsoft Windows Server2003
CTX127614 – Differences in Client Drive Mapping between XenApp 6.0 and 6.5, PresentationServer 4.5, and XenApp 5.0
CTX127968 – How to Enable Legacy Client Drive Mapping Format on XenApp 6.x andXenDesktop
CTX122327 – How to Enable and Configure the Plug-in Group Policy Settings for Client DriveMapping
The following information applies to legacy versions of Citrix Presentation Server/XenApp and XenApp 5 Windows Server 2008.
Client Drive Mappings Do Not Create For Any User
Ensure the Active Directory profile for the users having the issue have the default Connect client drives at logon box checked, if the ICA-TCP port properties are set to Inherit User Config.
Ensure the option to disable client drive mappings on the ICA-tcp listener in Terminal Services Configuration is not enabled. A Group Policy might gray out the check box selection.
Investigate the usage of Citrix policies, where applicable.
Removable drives must be inserted / attached to the client computer before the ICA connection. After the removable drive is inserted / attached, ensure the client is not reconnecting to a disconnected session or that the drive is not being restricted by a policy.
For Windows Terminal Server Installations, ensure the following registry entry exists and that the process, wfshell.exe, is running inside the session:
Caution! Refer to the Disclaimer at the end of this article before using Registry Editor.
CTX983798 – Purpose of CMSTART Command
Ensure the Client Network Service is started. Do not attempt to restart the Client Network Service when there is an existing ICA connection to the server. If the Client Network Service does not appear within services, verify that the key, CdmSerivce, and its subcatergories, Enum and networkProvider, along with their values are present under:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices. Check another working server for proper registry settings.
Ensure the RPC Service is started.
Ensure that Client Network is visible under Network Neighborhood. If it is not, complete the following steps:
Start Registry Editor (Regedt32.exe) and browse to the following key:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlNetworkProviderOrder The value for ProviderOrder contained only LanmanWorkstation.
Add CdmService, so that the Value now reads “CdmService,LanmanWorkstation.”
Ensure the path defined under the CommonFilesDir value from
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion is correct.
Restart the server.
Ensure Cdmprov.dll is in the system32 directory.
Ensure Microsoft files Mpr.dll, the Multiple Provider Router dll, and Mup.sys (the Multiple UNC Provider driver) are present.
Does drive mapping fail for the administrator? If not, ensure users have sufficient rights to the dlls, exes, and registry settings outlined in this section.
Does the command chgcdm /default work?
Does the command net use * \clientc$ work? If it does not, a System Error 67 appears.
Is a local Windows policy “Strengthen default permissions of global system objects” disabled? If so, Enable this policy.
Check the event log for CDM error messages.
Can a similar function be performed in a Microsoft network scenario?
Verify that the Cdm.sys file is in the Program FilesCitrixSystem32drivers directory.
Ensure logon scripts, such as Kixstart, do not include statements such as net use * /d.
If using Web Interface, does the template.ica or default.ica file have a value of
CDMAllowed=Off (for Client version 9.x or earlier) or CDMAllowed=False (for Client version
10.x or later)?
CTX117315 – Cannot Open More than 20 Files Concurrently Using a Client Mapped Drive byDefault.
CTX117481 – Manually Mapped Client Drives not Showing when Reconnecting to aDisconnected Session
CTX113480 – Error: Cannot copy (file name):Invalid MS-DOS Function… when using ClientDrive Mapping and Files Larger than 2 GB.
CTX103825 – Changes to Client Drive Files are not Immediately Updated
CTX124356 – How to Enable Read-Only Client Drive Mapping and Clipboard Mapping forXenApp
CTX124139 – Duplicate Auto-Mapped Local Client Drives in ICA Sessions
How to Map Client Workstation Network Drives in an ICA Session
Use the Net Use command in a logon script to map client network drives, even when the Citrix Management Console policy is enabled. For design and performance reasons, if the client mapped network drive is accessible on the network from the Citrix server, Citrix recommends that you do not use the following solution and that the network drive be mapped in a regular Windows logon script.
Note: The following point items are valid for all versions of XenApp.
- During logon, the ICA Client informs the server of the available client drives, COM ports, and LPT ports.
Client drive mapping allows drive letters on the Citrix server to be redirected to drives that exist on the client device; for example, drive H in a ICA user session can be mapped to drive
C of the local computer running the Citrix ICA Client. These mappings can be used by the File Manager or Explorer and your applications just like any other network mappings. Client drive mapping is transparently built into the standard Citrix device redirection facilities. The clients disk drives are displayed as share points to which a drive letter can be attached. The Citrix server can be configured during installation to automatically map client drives to a given set of drive letters. The default installation mapping maps drive letters assigned to client drives starting with V and works backwards, assigning a drive letter to each fixed disk and CD-ROM. (Floppy drives are assigned their existing drive letters.)
You can use the net use and change client commands to map client devices not automatically mapped at logon. Use the following command and syntax:
net use y: \clientc$ where y is the drive letter in a session and c is the client drive letter you want to map.
For more information about the location and creation of logon scripts, refer to the MicrosoftHelp and Support site.
Because Presentation Server 4.0 with Hotfix Rollup Pack 1 it automatically maps Network Drives. This is not by design.
“Network drives for client devices incorrectly map automatically as local client drives.”
How to Prevent Client Workstation Network Drives in an ICA Session
Enable a policy through the management console to prevent these drives from mapping.
Attempting to manually map the remote drive through the net use command will throw an error
“System Error 55 has occurred”. The specified network resource is no longer available.”
How to Disable Specific Client Drive Mappings
Complete the following steps:
Open the Module.ini file in a text editor (for example, Notepad) on the client device. In most cases, this file is in the Program filesCitrixICA client directory.
Add the following entry to the end of the [ClientDrive] section: DisableDrives =A,D,F
Save the changes and exit the text editor.
This entry prevents the client side drive letters A, D, and F from being mapped. The entry is not case-sensitive. If someone attempts to map a “disabled drive” through the client network within an ICA session (that is, net use * \clientD$), the following error message appears:
“System Error 55 has occurred. The specified network resource is no longer available.”
The same restriction can be applied to an .ica file (used with published applications) by adding “DisableDrives=” in the [Wfclient] section. Again, use a text editor to make this change.
Another solution is to enable a policy through the management console.
How to Map Only One Client Drive at Logon
From Terminal Services Configuration, double-click ICA-TCP connection type.
Select Client Settings.
Clear Inherit user config.
Clear Connect Client drives at Logon.
Note: Do not select Disable Client Drive Mapping; this will disable all future client drive mappings.
Create a logon script (.bat file) in the following format:
net use y: \clientc$ where y is the drive in a session and c is the client drive you want to map.
Note: This does not permanently disable clients from mapping another drive when they are logged on.
How to Make the Server Drives Appear as a Client Drive When Using the Pass-Through Client
Local or network drives configured on the server can now be mapped by the pass-through client.
How to Map Client Drives in Pass-Through Sessions – http://support.citrix.com/article/CTX127872
For legacy version 9.xx
Open the Module.ini file in a text editor and add the following line to the [ClientDrive] section of the file:
For version 10.xx and later
Create the Reg Value: NativeDriveMapping
Reg Type: REG_SZ
Add the Value: True
When this flag is set, the client drives on the client device are not mapped and are not available. The drives configured on the server are mapped and are available to the passthrough client.
CTX126763 – Client Drive is Not Mapped Using ICA Client Version 12 as Pass-Through Client
How to Ensure Client Drive Connectivity
Certain applications require access to client drive files to operate. When published, the executable can launch before the client redirector can finalize the client connections. This workaround ensures the client drives are available before the server executes the application.
Set user profile connection configuration to allow client drive access.
Publish an application that runs a batch file.
Create a batch file that resembles the following:
@echo off rem * rem * Wait on redirector to connect client drive. rem * In this case, we are using the V: drive as the client C:. rem * We also need something to look for on the client drive. rem * Adjust the settings accordingly. rem * echo Connecting...:DelayDIR %homedrive% /w > V:tag.txt IF EXIST V:tag.txt GOTO :Connected goto :Delay:ConnectedDEL V:tag.txtSTART /NORMAL /WAIT Explorer.exe
More Information About the IF Statement
IF [NOT] ERRORLEVEL number command
IF [NOT] string1==string2 command
IF [NOT] EXIST filename command
Note: Specifies that Windows NT will carry out the command only if the condition is false.
ERRORLEVEL: Number specifies a true condition if the last program run returned an exit code equal to or greater than the number specified. command – Specifies the command to carry out if the condition is met.
string1==string2: Specifies a true condition if the specified text strings match.
EXIST filename: Specifies a true condition if the specified filename exists.
If Command Extensions are enabled, IF changes as follows:
IF [/I] string1 compare-op string2 commandIF CMDEXTVERSION number command IF DEFINED variable command
where compare-op might be one of:
NEQ: not equal
LSS: less than
LEQ: less than or equal
GTR: greater than
GEQ: greater than or equal
The /I switch, if specified, indicates to perform case-insensitive string compares. The /I switch can also be used on the string1==string2 form of IF. These comparisons are generic in that if both string1 and string2 are both comprised of all numeric digits, the strings are converted to numbers and a numeric comparison is performed.
The CMDEXTVERSION conditional works like ERRORLEVEL, except that it is comparing against an internal version number associated with the Command Extensions. The first version is that it is incremented by one when significant enhancements are added to the Command Extensions. The CMDEXTVERSION conditional is never true when Command Extensions are disabled.
The DEFINED conditional works like EXISTS except that it takes an environment variable name and returns true if the environment variable is defined.
%ERRORLEVEL% expands into a string representation of the current value of ERRORLEVEL, provided that there is not already an environment variable with the name ERRORLEVEL, in which case you get its value instead. Using this and the preceding numerical comparison operators, you can do the following choice
goto answer%ERRORLEVEL%:answer0echo You typed Y for yes:answer1 echo You typed N for no
You can also use the numerical comparisons:
IF %ERRORLEVEL% LEQ 1 goto okay
%CMDCMDLINE% expands into the original command line passed to CMD.EXE prior to any processing by CMD.EXE, provided that there is not already an environment variable with the name CMDCMDLINE, in which case you will get its value instead.
More Information About the START Statement
Starts a separate window to run a specified program or command.
START [“title”] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED][/LOW | /NORMAL | /HIGH |
/REALTIME] [/WAIT] [/B] [command/program] [parameters]
- “title”: Title to display in window title bar. path – Starting directory.
/i: The new environment is the original environment passed to Cmd.exe and not the current environment.
MIN: Start window minimized.
MAX: Start window maximized.
SEPARATE: Start 16-bit Windows program in separate memory space.
SHARED: Start 16-bit Windows program in shared memory space.
LOW: Start application in the IDLE priority class.
NORMAL: Start application in the NORMAL priority class.
HIGH: Start application in the HIGH priority class.
REALTIME: Start application in the REALTIME priority class.
WAIT: Start application and wait for it to terminate.
B: Start application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application command/program. If it is an internal cmd command or a batch file, the command processor is run with the /K switch to Cmd.exe. This means that the window remains after the command is run. parameters – These are the parameters passed to the command/program.
If it is not an internal cmd command or batch file, it is a program and runs as either a windowed application or a console application.
Files saved to a client drive is successful but the file is corrupt or the saved file reports an invalid memory location
If the client drive or disk does not have enough space, the file copy passes but the file is truncated or the file will not copy and gives an invalid memory location error. No other feedback is given to the user.
Client Drives content may disappear in Windows Explorer and at a command prompt when applications open more than 20 file handles
Add the bolded entry to the Module.ini [ClientDrive] section. The Module.ini is in the Program FilesCitrixICA Client directory.
MaxOpenContext = (A number ranging from 21 to 1024.)
[ClientDrive] DriverName = VDCDM30.DLL DriverNameWin16 = VDCDM30W.DLL DriverNameWin32 = VDCDM30N.DLL MaxWindowSize = 6276 MaxRequestSize = 1046 CacheTimeout = 600 CacheTimeoutHigh = 0 CacheTransferSize = 0 CacheDisable = FALSE CacheWriteAllocateDisable = FALSE MaxOpenContext = 50 DisableDrives =
Note: The default is 20 file handles per drive. If it becomes necessary to increase this number, it is possible there is a handle leak with the applications accessing the client drives.