Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6870499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:41:28+00:00 2026-05-27T03:41:28+00:00

Does anybody know how to use the read from or write to Windows Registry

  • 0

Does anybody know how to use the read from or write to Windows Registry actions? All I get are failures when trying.

An example would be trying to read from HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit the CurrentVersion key, which I know is there and set, fails to read. I set registry root to HKEY_LOCAL_MACHINE and key name to SOFTWARE\JavaSoft\Java Development Kit and value name to CurrentVersion but it still fails. Any help would be really appreciated.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:41:29+00:00Added an answer on May 27, 2026 at 3:41 am

    Most likely you’re running a 32-bit installer, but you’re looking for the value in the 64-bit registry.

    32-bit executables have their own software settings under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. The registry actions always read from the registry view that corresponds to the bitness of the installer. If you have installed a 64-bit JDK and no 32-bit JDK, the registry value you’re interested in will be empty in the 32-bit view of the registry.

    To check if this is really the problem in your case, try to select “Generate 64-bit executables” in the “32-bit or 64-bit” step of the media wizard, it should then work as expected.

    With the API, you can set the registry view explicitly:

    Object value = WinRegistry.getValue(
        RegistryRoot.HKEY_LOCAL_MACHINE, 
        "SOFTWARE\\JavaSoft\\Java Development Kit",
        "CurrentVersion", 
        RegistryView.BIT64
    );
    if (value != null) {
        context.setVariable("javaCurrentVersion", value.toString()); 
    }
    

    By using RegistryView.BIT64 and RegistryView.BIT32 you can access the 64-bit view from a 32-bit installer and the 32-bit view from a 64-bit installer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write C in s-expressions and use compile-time macros. Does anybody know
Does anybody know of a way to use Guice to inject dependencies into the
Does anybody know which JSF version is most suitable to use when deploying to
Does anybody use bare .SWF files as webpages? I know it's possible; it seems
Does anybody know how I use asp.net mvc routing to force any non ajax
Does anybody know of any libraries that use design patterns that are implemented using
Does anybody know whether I can use multiple data sources in a single stateless
does anybody know of a secure 'read-once' local file access system? Or how one
Does anybody know how to use large toolbar icons? Edit: How do I do
Does anybody know how to use PHP to send product data to Amazon.com? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.