Question

I wanted my OpenFileDialog to start at My Computer to show all available drives. You would assume you could set the InitialDirectory property to GetFolderPath(Environment.SpecialFolder.MyComputer), but this function returns "", which doesn't have the desired result.

Digging around on Google I found this solution - which works

dlg.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"

Can anybody explain what this GUID actually is, and whether it will work across all versions of Windows? ie. How reliable is this approach?

Was it helpful?

Solution

http://www.insidetheregistry.com/regdatabase/browse.aspx?keyid=374

It says it was used in Windows NT4/2000. I have Windows 7, and this GUID is still used for My Computer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top