Reputation: 3761
If I press the start button and search "shell:SavedGames" it brings me right to a folder that seems to exist to contain game saves. There are many other folders that seem to be a default location for some kinds of data that can be found with the shell: command. Is there a standard way to access these folders programmatically?
Upvotes: 0
Views: 2338
Reputation: 6553
Are you talking about the Special Folders?
Console.WriteLine("GetFolderPath: {0}", Environment.GetFolderPath(Environment.SpecialFolder.System));
Thanks to Cody's comment for this other link:
Downloads folder: not special enough? and also PInvoke SHGetKnownFolderPath which has a list of Guids as well
You'd want to use PInvoke with the GUIDs from
FOLDERID_SavedGames
GUID{4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4}
Display Name: Saved Games
Folder Type: PERUSER
Default Path: %USERPROFILE%\Saved Games
CSIDL Equivalent: None, new in Windows Vista
Legacy Display Name: Not applicable
Legacy Default PathNot applicable
There is also a (semi old now) Library from Microsoft called Vista Bridge
Upvotes: 4