Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Registry problem with 64-bit Vista

Registry problem with 64-bit Vista

Scheduled Pinned Locked Moved C#
windows-adminbusinesshelpworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sifar 0
    wrote on last edited by
    #1

    Hi All, I have created one Windows Applcation and its Setup. While installing the appliaton with Setup.exe, I create one registry entry with below code.

    Step 1 : regKey = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\MyKey");

    Immediately after this, I read this value with below code.

    Step 2 : regRead = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MyKey", true);

    Then when I run the application I read the registry with below code, it is same as Step 2.

    Step 2 : regRead = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MyKey", true);

    All works fine.. But when I installed this application on 64-bit Vista Business machine it creates problem. Vista created Wow6432Node for registry entries of 32-bit application. It is a transparent process. For, Step 1 it has created MyKey under HKLM\SOFTWARE\Wow6432Node\Microsoft. For, Step 2 it has fetched value of MyKey from HKLM\SOFTWARE\Wow6432Node\Microsoft. For, Step 3 it does not find the registry entry and return null. Code for opening sub key in Step 2 and 3 is same.. Please advise.

    Regards, -SIFAR.

    M 1 Reply Last reply
    0
    • S Sifar 0

      Hi All, I have created one Windows Applcation and its Setup. While installing the appliaton with Setup.exe, I create one registry entry with below code.

      Step 1 : regKey = Microsoft.Win32.Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\MyKey");

      Immediately after this, I read this value with below code.

      Step 2 : regRead = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MyKey", true);

      Then when I run the application I read the registry with below code, it is same as Step 2.

      Step 2 : regRead = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\MyKey", true);

      All works fine.. But when I installed this application on 64-bit Vista Business machine it creates problem. Vista created Wow6432Node for registry entries of 32-bit application. It is a transparent process. For, Step 1 it has created MyKey under HKLM\SOFTWARE\Wow6432Node\Microsoft. For, Step 2 it has fetched value of MyKey from HKLM\SOFTWARE\Wow6432Node\Microsoft. For, Step 3 it does not find the registry entry and return null. Code for opening sub key in Step 2 and 3 is same.. Please advise.

      Regards, -SIFAR.

      M Offline
      M Offline
      monstale
      wrote on last edited by
      #2

      Hi, looks like the installer works on 32-bit environment (Wow6432Node, this is absolutly transparent for the installer). The application works on 64-bit and looks up the key like on a 32-bit mashine without Wow6432Node. is there a way to compile a installer for 64-bit sys? I'm not adept in installers. ;-) bye

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups