Windows XP to Windows Vista
Windows XP to Windows Vista
Note This documentation is preliminary and is subject to change.
A Windows XP to Windows Vista upgrade is a common scenario your game should support. In this scenario, a user installs your game on a Windows XP system, then upgrades to Windows Vista.
You must create a GDF and embed it within an executable or DLL in your game as in the Windows Vista scenario (see Creating Data Files), but during the installation phase of your game, four seperate tasks must be performed in your installation to support the Windows XP to Windows Vista upgrade scenario.
- You must install all of your game files
- You must generate your own InstanceID
- ShGetFolderPathEx is not available in Windows XP, so ShGetFolderPath must be used with the CLSIDs instead of Known Folder IDs.
- A set of keys must be placed in the registry
Generate Your Own InstanceID
In the Windows Vista installation scenario, you could simply call into the Game Explorer APIs to generate an InstanceID for your particular installation. In a Windows XP installation scenario, the APIs are not available. Instead, you must generate your own InstanceID GUID and persist it in the registry or a file. This InstanceID will be used in the next two tasks.
Windows XP Task Paths
Unlike the Windows Vista installation scenario, you cannot use ShGetFolderPathEx with FOLDERIDs to retrieve the task paths as defined in Game Explorer Tasks. Instead, you must use ShGetFolderPath with CSIDLs to install your tasks.
Name | Windows XP CSIDL Definition |
---|---|
Play task install location for all users | CSIDL_COMMON_APPDATA\Microsoft\Windows\GameExplorer\[GAME_INSTANCE_ID]\PlayTasks |
Play task install location for current user | CSIDL_LOCAL_APPDATA\Microsoft\Windows\GameExplorer\[GAME_INSTANCE_ID]\PlayTasks |
Support task install location for all users | CSIDL_COMMON_APPDATA\Microsoft\Windows\GameExplorer\[GAME_INSTANCE_ID]\SupportTasks |
Support task install location for current user | CSIDL_LOCAL_APPDATA\Microsoft\Windows\GameExplorer\[GAME_INSTANCE_ID]\SupportTasks |
Create Custom Registry Keys
You will need to create a set of registry tokens to identify your game to the Windows Vista installation process. Your game will be added automatically to the Game Explorer when the user installs Windows Vista.
First, you must determine the location of the key - this differs depending on whether your installation was for the entire system, or for just a single user.
Install Scope | Registry Location |
---|---|
Entire System | HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\GameUX\GamesToFindOnWindowsUpgrade |
Current User Only | HKEY_CURRENT_USER\Software\Classes\Software\Microsoft\Windows\CurrentVersion\GameUX\GamesToFindOnWindowsUpgrade |
In this location, you must install a subkey.
SubKey: GAME_INSTANCE_ID - a Guid of form {guid}
String:GDFBinaryPath
A string that contains the fully qualified path of the binary that contains the GDF.
String: GameInstallPath
A string that contains the path to the game install folder.