Search code examples
installationxnaregistrynsis

Installing dependencies for an XNA game: Where is the XNA Framework registry path?


How do I make an NSIS installer check if the user has the XNA and .NET frameworks installed, and install them if they aren't? (I'd rather not have it add extra prompt boxes appear, only have a page informing the user that I am making the installation).

EDIT: Due to no answer, I'll just ask this: Where is the XNA Framework in the Registry? Microsoft claims it is at HKEY_LOCAL_MACHINE\Software\Microsoft\XNA\Framework
( http://msdn.microsoft.com/library/bb464156(XNAGameStudio.40).aspx )

But I went to that path through regedit (in Windows 7), and it was not there. There was, however, an XNA folder at HKEY_CURRENT_USER\Software\Microsoft\XNA\
But not the /Framework directory.


Solution

  • Are you using Windows 7 64bit? If so you may be looking into wrong registry key. See this: http://en.wikipedia.org/wiki/WoW64#Registry_and_file_system

    There is special conversion for keys in 64bit Windows, for example:

    HKEY_LOCAL_MACHINE\Software\Wow6432Node 
    

    is the 32-bit equivalent of

    HKEY_LOCAL_MACHINE\Software
    

    (although 32-bit applications are not aware of this redirection).