It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
After sending an entire morning trying to find where my save game directory for Pharaoh went to, I discovered something that I thought might be useful to the community at large.

As you know, many older games save their settings, high scores and saves directly to their Program File directory or sub-directories. Pharaoh is an example. After installing Pharaoh Gold on Windows 8 and starting and saving a game, I could not find the Save games directory ANYWHERE. I could save and load games in Pharaoh, but couldn't find where they had actually GONE to. I wanted to copy some old save games from a previous install into the directory, but it was just not there.

After doing some research I discovered that Windows 7 and especially 8 blocks programs from writing data into the Program Files directories. You can forcibly write files in yourself, but programs can't because they don't have the proper rights. Any file that attempts to be written is redirected to a hidden directory: C:\Users\[Username]\AppData\Local\VirtualStore\Program Files (x86)\... These files are visible to the program that wrote them, but are not seen in the Program Files (x86) directory through Explorer (or any other program). This allows each user to have a "secure" location for writing game data. Once you FIND the files, you can read, write, copy, etc. them back and forth as you desire. You can manually copy the files BACK to Program Files, but the game will not be able to update them, only read them. Any new files will always go to the VirtualStore.

I thought this would be a good thing for GOGers to know about.
Never heard of this before, nice one!
old news....and one of the reasons why you should partition you hard drive.
If you install a new game after that just change the path .....and viola no
conflicts anymore
Well, this is very old news, it's been that way since Microsoft introduced UAC in Windows Vista more than 6 years ago. But I guess there will always be some people around who still haven't heard about it, so spreading this info won't hurt, even though most people ought to know that by now.

For what it's worth, the save game situation for WIndows 7/8 is actually much more complicated. Depending on the circumstances and on the game in questions, save games may end up in any of the following locations:

- the directory where the game was installed (or some subdirectory thereof)
- the shadow directory of a game's install location in a protected "Program Files" folder
- the active user's "My Documents" folder
- the "Saved Games" directory in the active user's "My Documents" folder
- a folder that is called "Saved Games" as well, and is also placed in "My Documents", but which is actually a different directory from the former, since the game uses the explicit folder name instead of the one in specified in Windows' system settings
- same as above, but in yet another folder that's called "SavedGames" (without a space in between)
- a folder that is called "Saved Games" that gets created directly in the active user's user folder even though that user has relocated his userdata to a different folder
- a folder called "Documents" in the active user's folder
- the "Local" folder in the active user's application data
- the "LocalLow" folder in the active user's application data
- the "Roaming" folder in the active user's application data
- the computer's "Public Documents" folder
- the "My Games" folder of the public user
- the "Public Documents" folder of the public user

During the past couple of years, I have found at least one game saving its data in either of the above 14 locations, and I strongly doubt that I caught all of them. It's a mess.
avatar
Psyringe: During the past couple of years, I have found at least one game saving its data in either of the above 14 locations, and I strongly doubt that I caught all of them. It's a mess.
Thank game developers for that. Apparently, two lines of code to set up / use the special Saved Games folder is too much.
avatar
Elenarie: Thank game developers for that. Apparently, two lines of code to set up / use the special Saved Games folder is too much.
Yeah, I also think it's silly that practically no game lets you specify where the save files should go. It would be just SO much simpler!
avatar
Psyringe: Well, this is very old news, it's been that way since Microsoft introduced UAC in Windows Vista more than 6 years ago. But I guess there will always be some people around who still haven't heard about it, so spreading this info won't hurt, even though most people ought to know that by now.
Why would MOST people know about a HIDDEN folder?
avatar
Psyringe: Well, this is very old news, it's been that way since Microsoft introduced UAC in Windows Vista more than 6 years ago. But I guess there will always be some people around who still haven't heard about it, so spreading this info won't hurt, even though most people ought to know that by now.
avatar
Egotomb: Why would MOST people know about a HIDDEN folder?
Because the issue has been discussed in practically every single gaming forum since 2007, and it keeps coming up since there are always some people to whom this is new.

Basically, UAC (and old games' problem with it) are a stumbling block for everyone who's switching from a pre-Vista OS to post-XP OS, and who hasn't kept up in gaming forums for the past 6 years. Windows does nothing to prepare you for that change, and the old games don't either. However, the number of people who fall into this category gets smaller every year. In 2007, every single gaming forum I was active in had a thread about Vista incompatibilities, often stickied. Today, there's just the occasional post from a latecomer, perhaps once every six months.
avatar
singbird: Yeah, I also think it's silly that practically no game lets you specify where the save files should go. It would be just SO much simpler!
Oh nonono, they just do this:
"%USERPROFILE%\saved games\gameName"
Yeah? That line of code. One bloody line. This always makes me angry.

edit: Just to clarify, what you said doesn't make me angry, that it's not used does.
Post edited April 21, 2013 by Fenixp
avatar
singbird: Yeah, I also think it's silly that practically no game lets you specify where the save files should go. It would be just SO much simpler!
avatar
Fenixp: Oh nonono, they just do this:
"%USERPROFILE%\saved games\gameName"
Yeah? That line of code. One bloody line. This always makes me angry.

edit: Just to clarify, what you said doesn't make me angry, that it's not used does.
It's not just one line of code. There's that line, then there's the line making sure that the folder is valid, and the ones that make sure that the data is being properly written to the correct directory.

Still, presumably there are libraries that handle that and MS probably even provides them for their languages.
avatar
hedwards: It's not just one line of code. There's that line, then there's the line making sure that the folder is valid, and the ones that make sure that the data is being properly written to the correct directory.

Still, presumably there are libraries that handle that and MS probably even provides them for their languages.
Yes, you're right, with the use of .NET, you can achieve this in about 3 lines or so, without it, I can't imagine it would be that harder
avatar
hedwards: It's not just one line of code. There's that line, then there's the line making sure that the folder is valid, and the ones that make sure that the data is being properly written to the correct directory.

Still, presumably there are libraries that handle that and MS probably even provides them for their languages.
avatar
Fenixp: Yes, you're right, with the use of .NET, you can achieve this in about 3 lines or so, without it, I can't imagine it would be that harder
I just wish that developers would spend more time engaging in best practices so that the rest of us don't have to waste time worrying about where our save games and such have been stored.
avatar
Fenixp: "%USERPROFILE%\saved games\gameName"
That actually won't work if the user has changed the location of his "Saved Games" folder. There ought to be an environment variable directly for the savegame folder, which should be used instead. Assuming that the user's savegame directory still has the default name of "Saved Games" will work for most users, but not all.
Post edited April 21, 2013 by Psyringe
avatar
Fenixp: "%USERPROFILE%\saved games\gameName"
avatar
Psyringe: That actually won't work if the user has changed the location of his "Saved Games" folder. There ought to be an environment variable directly for the savegame folder, which should be used instead. Assuming that the user's savegame directory still has the default name of "Saved Games" will work for most users, but not all.
Can easily be taken care of. Saved Games has its own KNOWNFOLDERID value, which can be queried against to detect the proper location, in case the user has changed it.

[url=http://msdn.microsoft.com/en-us/library/dd378457(v=vs.85).aspx]http://msdn.microsoft.com/en-us/library/dd378457(v=vs.85).aspx[/url]

and

[url=http://msdn.microsoft.com/en-us/library/bb762188(v=vs.85).aspx]http://msdn.microsoft.com/en-us/library/bb762188(v=vs.85).aspx[/url]
Post edited April 21, 2013 by Elenarie
avatar
Psyringe: Well, this is very old news....
I've been gaming on PCs since there were PCs and have used every version of Windows from 2.0 to 8. I've gamed on Vista and Win7 and although I am familiar with the myriad of places that games can be saved in, I have never heard of or seen the VirtualStore hidden directory until I started using Windows 8. While it took a little doing initially, I was always able to easily add and edit files in the Program Files directories under Windows 7 (and below). However, under Windows 8, if UAC is on (and it is extremely difficult to keep it off permanently and still have the OS work as intended) you (and your games) simply cannot write into that directory tree without individually approving each file overwrite. Therefore, I think this IS a "new" thing. While it MAY have existed in Vista/7, it was not obtrusive enough to be noticed until now.