How to troubleshoot citrix xenapp client drive mapping
This article highlights many common client drive mapping inquiries and issues along with their respective explanation or resolution. The management consoles may allow the configuration of policies to assist with some of the desired client drive mapping settings.
Client Drive Mappings Do Not Create For Any User
- If the ICA-tcp port properties are set to “Inherit User Config” make sure the Active Directory profile for the users having the issue have the “Connect client drives at logon” box checked. (Which is the default setting.)
- Ensure the option to disable client drive mappings on the ICA-tcp listener in Terminal Services Configuration is not enabled. A Group Policy may gray out the check box selection.
- Where applicable, investigate the usage of Citrix policies: CTX107920 – Unable to Browse Client Drives After Installing Service Pack 4 for MetaFrame XP or Later 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 2000 and 2003 Terminal Server Installations, ensure the following registry entry exists and that the process, wfshell.exe, is running inside the session: WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon Key Name: AppSetup Value: Cmstart.exe CTX983798 – What Does the CMSTART Command Do?
- 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_MACHINE\SYSTEM\CurrentControlSet\Services\. 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, follow the steps listed below:
a. Start Registry Editor (Regedt32.exe) and go to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order The value for ProviderOrder contained only LanmanWorkstation. Add CdmService, so that the Value now reads “CdmService,LanmanWorkstation.”
b. For Presentation Server 4.5, ensure the path defined under the CommonFilesDir value from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion is correct.
c. 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 * \\client\c$ work? If it does not, a System Error 67 appears.
- Is a local Windows 2000/2003 policy “Strengthen default permissions of global system objects” disabled? If so, Enable this policy or apply Citrix Hotfix XE104W2K3R01 / MPSE300W2K3R03 or the Operating System equivalents. Citrix Presentation Server 4.0 includes the fix.
- 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 Files\Citrix\System32\drivers directory.
- For Terminal Server 4.0 installations, check to see if the following registry entry exists: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon Key Name: Userinit Value: Ctxlogon.exe
- Ensure logon scripts, such as Kixstart, do not include statements such as net use * /d.
- CTX109649 – ICA Client Drive File and Folders are Not Refreshed or Updated Unless F5 is Used
- CTX109638 – Hotfix XE104R02W2K3013 – For MetaFrame XP 1.0 for Windows Server 2003 Browsing local files and folders within ICA sessions may intermittently display zero objects within the local client drive. [From XE104R02W2K3013][#133520]
- If using Web Interface, does the template.ica or default.ica file have a value of CDMAllowed=Off (for Presentation Server Client version 9.x or earlier) or CDMAllowed=False (for Presentation Server Client version 10.x or later)? See CTX331178 – Appsrv.ini Parameters Deciphered and CTX107102 – Presentation Server Program Neighborhood Client for 32-Bit Windows Configuration Guide (INI File Reference), Version 9 for more information.
- CTX117315 – Cannot Open More than 20 Files Concurrently Using a Client Mapped Drive by Default
- CTX117481 – Manually Mapped Client Drives are not Mapped when Reconnecting to a Disconnected Session
- CTX113480 – Error: Cannot copy (file name):Invalid MS-DOS Function… when using Client Drive Mapping and Files Larger than 2 GB
- CTX103825 – Changes to Client Drive Files are not Immediately Updated
- CTX121110 – Client Drive Mapping Fails if Symantec Endpoint Protection is Installed
- CTX124356 – How to Enable Read-only Client Drive Mapping and Clipboard Mapping for XenApp Feature Pack 2
- CTX124139 – Duplicate Auto-Mapped Local Client Drives in ICA Sessions
- CTX125865 – Created and Accessed Timestamps Are Not Shown on Files Located on Client-Mapped Drives
Configuring Server Drive Letters For Client Drive Mapping
The Citrix XenApp plugin/ICA Client supports client drive mapping functionality. Client drive mapping allows users logged on to a XenApp server from a client device to access their local drives transparently from the ICA session. Client devices can transparently access files contained on the local machine and data can be cut and pasted between local and remote sessions using the clipboard. During the initial installation of XenApp, the administrator is prompted to modify the server drive letter assignments to avoid conflicts with user drive letters (except with Windows Server 2008 where drive remapping is not supported). MetaFrame XP Feature Release 2 for Windows 2000 and later uses a different mechanism for drive remapping. For additional information, refer to the following articles:
Client drive mappings are transparently built into the standard Citrix device redirection facilities. These client mappings appear as another network type (Client Network). Client devices are displayed as share points to which a drive letter can be attached. Client device mappings can be used by the File Manager and other applications just like any other network mappings.
The default drive letters assigned to client drives start with V and work backwards assigning a drive letter to each fixed disk and CD ROM. (Floppy drives are assigned their existing drive letters.) This method yields the following drive mappings:
Client drive letter
Is accessed by the Citrix server as
If the Citrix server drive letters do not conflict with client drive letters, the client drive letters can be accessed with their existing drive letters. So that the Citrix server drive letters do not conflict with the client drive letters, you need to change the server drive letters to higher drive letters. For example, changing Citrix server drives C to M and D to N allows client devices to access their C and D drives directly.
Click Yes to allow Citrix ICA Client devices to access their local drives as follows:
Client drive letter
Is accessed by the MetaFrame server as
If you click Yes, the next screen allows you to choose the drive letter to replace the servers drive C. All other fixed disk and CD-ROM drive letters are replaced with sequential drive letters (for example; C->M, D->N, E->O). Choose drive letters that do not conflict with any existing network drive mappings. If a network drive is mapped to the same drive letter as a Citrix server drive letter, the network drive mapping will not be valid.
How to Modify Initial Client Drive and NetWare Drive Letters
In MetaFrame 1.x/XP, client drive mapping and NetWare login script execution occur asynchronously, in parallel. Therefore, it is very important for the Citrix administrator to ensure that no drive mapping conflicts exist between the client drives and NetWare drives. It is possible that a user could find drive V mapped to his client drive C during one ICA session but have it mapped to SYS:PUBLIC during another session. This situation can be avoided by setting two new registry values.
InitialClientDrive defines the first drive letter to use for client drive mapping. The system works backward through the alphabet from this letter to map client drives that could not be mapped to their “native” drive letters.
InitialNetwareDrive defines the drive letter to be used for the NetWare SYS:LOGIN directory that is mapped to the preferred server during the initial NetWare attachment. This setting is the equivalent of the DOS VLM NET.CFG setting “First Network Drive.” If this value is not set, the first available drive letter starting with drive C and working up to drive Z is used for this mapping.
Because the logon process is multi-threaded, it is impossible to know for sure what order the various drive mappings will take. This was done to speed the logon process. The following steps take place concurrently during logon:
- If the “Disable Client Drive Mapping” option in Connection Configuration is not checked and home directory mapping is configured in User Manager for Domains, the client drives are mapped using Steps a and b below. If client drive mapping is disabled, the client drives can still be mapped manually by the logon script or by the user after logging in.
a. Any available drive letters that match the clients native drive letters are used. Available drive letters are drives not in use as local MetaFrame server drives or network connections. For example, if drive C is not in use on the server, it is mapped to the clients drive C (\\Client\C:).
b. For those client drives left unmapped by Step 1A, the system starts at drive V and works backward through the alphabet, using available drive letters sequentially for the remainder of the client drives. Drive letters that are already in use as MetaFrame server drives, mapped to persistent network connections, or mapped by NetWare logon script processing are skipped. For example, drive V is mapped to \\Client\C: when drive C is in use as the Citrix servers local drive C.
- Any drive mappings configured in NetWare logon scripts are performed. If a drive letter is already in use, the mapping fails and the existing drive mapping remains.
- Any persistent drive mappings manually configured by the user are performed. If a drive letter is already in use, the mapping fails and the existing drive mapping remains.
Consider the following examples:
Example 1 Citrix server local drives: C:, D:, T: Client has drives C:, D:, E: InitialClientDrive is set to: V: (the new default)
In this particular example, drive V is mapped to the clients drive C, drive U is mapped to the clients drive D, and drive S is mapped to the clients drive E because drive T is already in use on the server.
Example 2 Citrix server local drives: E:, F: NetWare logon script mappings: X:, Y:, Z: Client has drives: C:, D:, E: InitialClientDrive is set to: V: (the new default) InitialNetwareDrive is set to: G: (not set by default)
In this example, drive C is mapped to the clients drive C, drive D is mapped to the clients drive D, and drive V is mapped to the clients drive E.
Example 3 Citrix server local drives: E:, F: NetWare logon script mappings: V:, W:, X:, Y:, Z: Client has drives: C:, D:, E: InitialClientDrive is set to: V: (the new default) InitialNetwareDrive is not set (the default)
This configuration can be very confusing. Because the InitialNetwareDrive registry value is not set, it is possible that drive C could be mapped to SYS:LOGIN on the NetWare server or to the clients drive C. It is also possible that drive V could be mapped to the NetWare server or to the clients drive E or C. It depends upon whether or the NetWare script execution completes before the client drive mapping or vice-versa.
Avoid the last configuration (Example 3) if at all possible. Citrix recommends that both the InitialNetwareDrive and InitialClientDrive values be set to avoid this problem. Follow these guidelines when setting these values:
Set InitialNetwareDrive one drive letter higher than the last physical MetaFrame server local drive.
Set InitialClientDrive so that client drive mappings won’t conflict with NetWare mappings. If your logon script maps drives F though L and T through Z, set InitialClientDrive to S.
To Add the Registry Values
WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows NT to correct them. Citrix cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk.
- Run Regedt32.exe.
- Locate the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix
- With this key highlighted, select Add Value from the Edit menu.
- Type InitialClientDrive in the Value Name field. This defines the first drive letter to use for client drive mapping. The system searches backward through the alphabet to assign drive letters to client drives that could not be mapped to their “native” drive letters.
- Select REG_SZ from the Data Type pull-down list, and then click OK.
- In the String field, type the drive letter that you want to use. Include the colon; for example, S:.
- Click OK.
- The correct registry path for IntialNetwareDrive is: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
- Select Add Value from the Edit menu.
- Type InitialNetwareDrive in the Value Name field. This defines the drive letter to use for the NetWare Sys.login directory that is mapped to the preferred server during the initial NetWare attachment. This setting is the equivalent of the DOS VLM Net.cfg setting “First Network Drive.” If this value is not set, the first available drive letter starting with C and working up to Z is used for this mapping.
- Select REG_SZ from the Data Type pull-down list, and then click OK.
- In the String field, type the drive letter that you want to use. Include the colon; for example, F:.
- Click OK.
- Exit the Registry Editor.
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 prefers that you do not following the solution below and that the network drive be mapped in a regular Windows NT logon script.
Known Limitation: CTX835260 – File Locking Fails Through Client Mapped Remote Network Drives and Content Redirection.
The below 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. Here is the command and syntax: net use y: \\client\c$ 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 Microsoft Help and Support site.
Presentation Server 4.0 with Hotfix Rollup Pack 1 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 give an error “System Error 55 has occurred. The specified network resource is no longer available.”
How to Disable Specific Client Drive Mappings such as the A: drive
Perform 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 files\Citrix\ICA 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.
- Restart the ICA Client and establish a connection to the Citrix server.
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 * \\client\D$), 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 your connection type.
- Select Client Settings.
- Clear Inherit user config.
- Clear Connect Client drives at Logon.
- Click OK. 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: \\client\c$ 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 Map Client Drives in Ascending Order
By default, when server drives are not remapped (C and D) or the above initialclientdrive registry value is set, client drives are mapped in descending order. See “Configuring Citrix Server Drive Letters for Client Drive Mapping” for more information. The methodology explained in “How to Map Only One Client Drive at Logon” can be used to create the mapping in ascending order.
How to Make the Server Drives Appear as a Client Drive When Using the PassThrough Client
From the 6.20.986 ICA Win32 Client ReadMe:
Client drive mapping on the pass-through client was restricted to the drives on the client device. The client could not map local or network drives configured on the MetaFrame server in a pass-through session.
Local or network drives configured on the MetaFrame server can now be mapped by the pass-through client.
For 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
- Run Regedit.
- Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\Engine\Configuration\Advanced\Modules\ClientDrive
- 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 MetaFrame server are mapped and are available to the pass-through client. CTX126763 – Client Drive is Not Mapped Using ICA Client Version 12 as Pass-Through Client
How to Ensure Client Drive Connectivity
If using WinFrame 1.7 with Service Pack 5B and Hotfix SE17B039.EXE, the following information may be necessary. This method was never tested on Windows NT 4.0 Terminal Server Edition or Windows 2000. The idea, however, is important and a similar solution may be possible on Windows NT 4.0 Terminal Server Edition or Windows 2000.
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 WinStation 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… elay DIR %homedrive% /w > V:\tag.txt IF EXIST V:\tag.txt GOTO :Connected goto elay :Connected DEL V:\tag.txt START /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 command IF CMDEXTVERSION number command IF DEFINED variable command
where compare-op may be one of:
EQU – equal NEQ – not equal LSS – less than LEQ – less than or equal GTR – greater than GEQ – greater than or equal
and the /I switch, if specified, says to do 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 just 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 just 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 above numerical comparison operators, you can do the following
choice goto answer%ERRORLEVEL% :answer0 echo You typed Y for yes :answer1 echo You typed N for no
You can also use the numerical comparisons above:
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 Files\Citrix\ICA 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.
How to Disable Floppy (A:) Drive Query at Logon
This document describes how to disable floppy or a drive access when a user logs on to an ICA session by changing the ParseAutoexe registry key from 1 to 0. See Microsoft article Q124551. See the above section titled How to Disable Specific Client Drive Mappings such as the A: drive for additional information.
Cannot Save Word97 Docs with Long Filenames to Citrix Drive A:
When the File Open or Save As dialog box is opened, Word brings up the last drive letter used. If that drive was a remote share, Word starts a search for the correct remote share at drives C through Z, because drive letters A or B are not usually referenced as network shares. If Word cannot find the correct remote share, it makes a new connection with a NULL local drive name.
This occurs on all versions of Windows NT with varying results, as explained below.
Windows NT 4.0/3.51
Map a remote share to drive B; for example, \\ExampleServer\Documents. Net Use B: \\ExampleServer\Documents. Open Word from the Windows NT 4.0 console. Open a file or save a file to drive B. Click File Open again; Word makes a new connection because it cannot find drive B.
A connection is made to \\ExampleServer\Documents with no local drive name.
WinFrame Version 1.7
\\Client\A$ is mapped to drive A. Using Word, save or open a file from drive A. Click File Open again. Notice that Word is not looking for files on drive A but is using a temporary mapping with no local drive name to \\client\A$.
MetaFrame Version 1.x
\\Client\A$ is mapped to drive A. Using Word, save or open a file from drive A. Click File Open again. Notice that Word is not looking for files on drive A but is using a temporary mapping with no local drive name to \\client\A$. Also, a new connection has been established to \\client\A$ at local drive F because we do not allow permanent connections to the client to have a NULL local name.
Note: Office 95 applications do not have any problems saving long filenames to the Citrix ICA Client.
Note: There is no fundamental universal code change that can be made to client drive mapping to work around Words logic when looking for remote shares.
Saving Long Filenames with the DOS Client
The standard 8.3 format must be used in saving to local drives with the ICA DOS Client. The Citrix server does not physically write the file, rather, the ICA DOS client is sent the file and the ICA Client writes it. Thus, the ICA Client cannot write a long filename because the DOS operating system does not support long filenames.
Internet Explorer 5.0 saves HTML pages with all images by creating its own directories and file names. These file names are long file names that are not compatible with the DOS Client.
Save the file to the server drive. Then rename and copy the resulting directory and files to the client drive.