Archive: How to get Saved Games folder


How to get Saved Games folder
Is there a way to get a user's Saved Games folder on Vista or Win7? I could use "$PROFILE\Saved Games\", but this does not take into account the possibility of a user that has renamed or moved this folder. The Registry uses a GUID string to store the value in addition to a string named "!Do not use this registry key" inside the key where the shell folders are located. I thought of the System Plugin's Get Special Folders, but it does not seem to take into account this directory.


i understand that you'd like to make your installer as conventient to use as possible, but i also think that a user who has removed/renamed such a folder has to deal with the consequences on his own.

however, as "saved games" might be localized, i wouldn't rely on "$PROFILE\Saved Games".


As I said, I could use "$PROFILE\Saved Games", but it is a system folder on Vista/Win7 and as such, it seems like if it is not one of the NSIS built-in variables (i.e. $STARTMENU or $DOCUMENTS) it would be a good idea to have it added to the System Plugin's Shell Folder functions, however, I am afraid that writing or modifying plugins is beyond my abilities. I am able to write some decent NSIS scripts, but I am not a programmer.

The Registry string I mentioned, named "!Do not use this registry key" has a value of

Use the SHGetFolderPath or SHGetKnownFolderPath function instead
Is there anyway to call either of these functions using the System Plugin?

Originally posted by Collector9999
The Registry string I mentioned, named "!Do not use this registry key" has a value of
Use the SHGetFolderPath or SHGetKnownFolderPath function instead
Is there anyway to call either of these functions using the System Plugin?
There is. If you search the NSIS forum for 'shgetfolderpath', you'll find some examples really quick: http://forums.winamp.com/showthread.php?p=2462946#4

Then, a quick google for "saved games csidl" found this: http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
Next up, a google for "!define FOLDERID_SavedGames" to find the numerical value of the constant. And goody goody, Christmas came early: http://portableapps.com/node/11936

This took exactly 3 minutes of work. Why didn't you try it yourself?