Solved

c# List user drives for Citrix XenApp program

Posted on 2011-09-05
6
765 Views
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
                MessageBox.Show(DriveList[i]);
            }

Open in new window

0
Comment
Question by:socom1985
  • 3
  • 3
6 Comments
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 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....)
0
 
LVL 1

Author Comment

by:socom1985
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.
0
 
LVL 44

Expert Comment

by:AndyAinscow
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 ?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:socom1985
ID: 36484337
yes both miss the drives..
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 36484361
I'd misunderstood what was not working.  No other ideas.
0
 
LVL 1

Author Closing Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

#CITRIX #XENDESKTOP #POC #Citrix Studio
Citrix XenDesktop 7.6 Citrix Policies Audio
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now