Roberto Alves

Scripting and server based computing

Simple and better solution to redirect local drives in XenApp sessions

ICA or RDP are not the best protocols to copy files between DataCentres and remote workstations. But, some times is very difficult to implement a different solution to provide access to users local files from Citrix XenApp or Terminal Services, and even if the idea was rejected in the design of your environment, one day you will be faced with this problem and may be your easiest and better option will be enable redirection from local drives to remote sessions.

Well, you can select if you want map/redirect floppy disks, cd roms, remote drives or local drives. If you are worried with the impact of this configuration in the logon time of your users, probably you will enable just the redirection for local drives and unfortunatelly you will consider that many users can have more than one local drive and this can affect their logon.

But, you still can have problems. Let’s say that your company has a policy to prevent users to access their local C: drives. Enabling the redirection, the C: drive will appear in the remote session and users will be free to do what they want with these drives.

Maybe the best solution can be just redirect one drive. But how to do the redirection of just one local drive if users can have many others?

Simple:

1. Create a policy disabling the drive connection at logon

redirect_drives1

2.  And in this policy, enable just the local drives mapping

redirect_drives2

Now, users will have a connection to their local drives but the redirected drive will not be created. If you check at Windows Explorer – My Network Places – Client you will see the resource available for connection.

3. Include in your login script, some code to map the drive, like this below in .vbs:

Set oNet = WScript.CreateObject(“WScript.Network”)
Set objShell = CreateObject(“Shell.Application”)
onet.MapNetworkDrive “D:”, “\clientd$”, True
objShell.NameSpace(“D:”).Self.Name = “Files on my PC”

or like this in .bat:

net use d: \clientd$

In both case,  I redirected the local D: drive to a mapped D: drive in the XenApp server. Of course that the D: drive must to be NOT in use on XenApp servers. I used D: to create a standard of all users store their files in D: drive of their machines, and they will see the same letter in Citrix sessions.

The result? Just one drive redirected to local resources (D:).

redirect_drives3

If users want copy files from any media (USB, CD ROM, Cameras, etc) to Citrix they need copy to D: local drive and then copy from D: to Citrix session drives. Sometimes can be a little confusing, but can ensure to me a reliable environment, without users complaining that they can’t see cameras or usb stick on their sessions due errors or inapropriate logoff/logons and ensure to me that all users spend the same time to map local drives, without affect logon time.

Category: Citrix

Your email address will not be published. Required fields are marked *

*