CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Jul 2003
    Location
    Springfield
    Posts
    190

    Wow6432Node - 32-bit Application on Windows 7 64-bit

    My 32-bit application (.Net Framework 3.5 compiled with MS Visual Studio 2008) has got problems when it is installed on Windows 7 64-bit machines.
    I found this code to access a Registry path saved on a Windows 64-bit machine.
    RegistryKey registryKey;
    if (Environment.Is64BitOperatingSystem == true)
    {
    registryKey = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry64);
    }
    else
    {
    registryKey = RegistryKey.OpenBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, RegistryView.Registry32);
    }
    I wonder why should I change my application to work on both Windows 32-bit and 64-bit.
    Shouldn't Windows 7 64-bit take care of it? Isn't this an installation issue, instead of my app duty to discriminate among the operating systems?
    Is that code a good approach to solve it, or there's something better? For instance, changing something in the installer setup, rather than the application itself.
    Last edited by MontgomeryBurns; October 12th, 2010 at 07:43 AM.
    Mr. Burns

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured