[casual_games] More good news on Vista!

Chuck Walbourn chuckw at microsoft.com
Fri Jan 26 14:18:12 EST 2007




> We are seeing exactly this behavior (with unwrapped installs of our games).

> When a user installs the game in Vista or XP LUA, they need an Admin password. Then during that play session the savegame

> files are not going into the LUA user's folder, and when they play the game later (after a

> reboot) it works fine but acts like it is the first time is had been run.

> This is probably, at the very least, something we'll want to bring to the user's attention when they install or first run

> the game.


The specific scenario you are talking about is more specific than that. The 'first-run going to the admin account instead of the user account' problem happens when the person who initiated the install is not an admin on the box (ie, a true Standard User). When the credentials are entered into the box, the setup actually runs as that account. If the game is launched directly from this elevated setup, then the account it inherits is still the admin account, not the original user. For your typical user account that has Admin rights but is running as a Standard User, the elevated setup will still be running as them. Of course, you don't really want first-run to inherit the admin rights in that case either.

There are a few solutions here, but the easiest one to implement is probably to use a boostrapper. This is detailed in the MSDN Magazine article below under the section "Problems During Installation".



> We explored using a similar path but found that the folder was hidden. Is that 'program data' path hidden on Vista? Does

> this translate to the application data folder on XP (which _is_ hidden, I believe)?

> Even some of our very 'casual' users like to access their savegame data to backup, move, revert, etc. We would be very

> reluctant to put it in a hidden folder.


There are two common locations to use as your base save game folder: CSIDL_LOCAL_APPDATA or CSIDL_PERSONAL. CSIDL_PERONAL (aka "My Documents" now just called "Documents") is not hidden, while CSIDL_LOCAL_APPDATA is hidden. Note that one of the common operations from the right-click menu of the Game Explorer is to open up a window for the game's registered "saved games" location, so if you use that it is pretty easy to find them no matter where you saved them. There is also a new location you could use for Windows Vista only that is "Saved Games", but as it doesn't exist in Windows XP it won't be migrated during upgrades and right now it makes more sense to stick with ShGetFolderPath() which is universal to all versions of Windows back to Windows 95 rather than the Vista-only IKnownFolders API.


This MSDN Magazine article is actually a pretty good summary of common appcompat issues due to UAC: "Teach Your Apps To Play Nicely With Windows Vista User Account Control" (MSDN Magazine) <http://msdn.microsoft.com/msdnmag/issues/07/01/UAC/>

Also, we recommend you read the document "User Account Control for Game Developers" in the DirectX SDK (December 2006) <http://msdn2.microsoft.com/en-us/library/bb206295.aspx>. One of the topics in this article is to explain "virtualization" (the general appcompat fix for legacy behavior of writing to Program Files or HKEY_LOCAL_MACHINE under Windows Vista UAC), how it works, and it's limits.

-Chuck Walbourn
SDE, Game Technology Group


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://seven.pairlist.net/pipermail/casual_games/attachments/20070126/f489ae21/attachment.html


More information about the Casual_Games mailing list