views:

125

answers:

2

Hi,

I'm working on a project in C# on Windows XP where we have to capture a file dialog which allows users to select mulitple files (such as shown here: http://www.uploadify.com/demo/). Is it possible somehow to restrict access to local drives, such as C:, etc...? So the list of available drives would only contain drives that aren't excluded.

Thanks.

A: 

And why would you want to restrict this to local drives? This is the work of the client, not the server. You cannot force the client into this if they're using a standard web browser.

MiffTheFox
Perhaps my original post was confusing. I am on the client side. I'm creating a kiosk like application for a locked down IE, basically. I want the upload dialog to appear with only removable media as options, and no local files.
+1  A: 

Probably the simplest way to do this would be to just write your own dialog which exposes only the drives you want. I don't think the standard dialog accepts flags which control which drives are shown.

Having said that, there /is/ systemwide group policy that can be used to hide drives from ALL common file dialogs, but this would impact ALL applications.

If you're building a kiosk, keep in mind that bad guys attack these things pretty regularly. (See http://ikat.ha.cked.net/Windows/index.html, which is bizarrely, NSFW)

EricLaw -MSFT-