Set 'My Computer' location on a OpenFileDialog (WindowsAPICodePack)

Viewed 3665

I would like to set the InitialDirectory property of a WindowsAPICodePack CommonOpenFileDialog to My computer Location, I did it using the equivalent CLSID or GUID or what the hell is that, just I would like to know if exist a more native/safe way to correctly set the My computer location, I've tried this but didn't worked:

.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer) 

This is the code that I'm using:

Dim FolderPicker As New Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog

With FolderPicker

    .IsFolderPicker = True
    .Title = "Folder Dialog Test"
    .InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" ' My Computer
    .DefaultFileName = "C:\"

End With

UPDATE:

I'm on Windows 8 x64.

The other special folders such as libraries and desktop works like this:

.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) 
1 Answers
Related