Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


c# List user drives for Citrix XenApp program

Posted on 2011-09-05
Medium Priority
Last Modified: 2012-05-12
I have an application which should have a dialog with only the user drives. When I use the normal windows fileopen dialog I also see the local drives on the server.. But the customer should only see his own drives.. I tried to make an own dialog but I don't know how to list the user drives. With the following code I can see only local drives and network drives.

// Store the list of drives into an array of string
            string[] DriveList = Environment.GetLogicalDrives();
            // Loop through the array
            for (int i = 0; i < DriveList.Length; i++)
                // Show each drive

Open in new window

Question by:socom1985
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 44

Accepted Solution

AndyAinscow earned 2000 total points
ID: 36484246
Have a look at DriveInfo.GetDrives(); - that might be more what you want because you can then see what the type of drive is (Fixed, Network....)

Author Comment

ID: 36484319
Hey thx but same thing happends :( . I found out that I can connect to the drives via \\client\c$

To find out which letters are in use i check if a file exists.. but this is not as fast as I want. so any further ideas are much appriciated.
LVL 44

Expert Comment

ID: 36484334
>>Hey thx but same thing happends

Your original method returns an array of strings.  The alternative I suggested will return an array of DriveInfo objects.  You can then loop through the array and test what sort of drive it is, eg. Fixed, Network... and filter out the types of drives you require.

Or do you mean both miss drives you require to be shown ?
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 36484337
yes both miss the drives..
LVL 44

Expert Comment

ID: 36484361
I'd misunderstood what was not working.  No other ideas.

Author Closing Comment

ID: 37255147
I still slow but it's the best way i guess.

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several days of searching and hunting for limited documentation, I wanted to share this guide to hopefully save someone the hassle of trying to figure this out on their own. I have tested this on Xendesktop 7.1 and PS 4.5 running simultaneous…
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question