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

  • Home
  • SEARCH
  • 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 8206769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:47:01+00:00 2026-06-07T08:47:01+00:00

I have a console program that read a registry key under HKCU: OpenSubKey(Software\\Autodesk\\AutoCAD) The

  • 0

I have a console program that read a registry key under HKCU:

OpenSubKey("Software\\Autodesk\\AutoCAD")

The program works very fine, but when I tried to use it as a Custom Action in an install project, it returned a null value.

Here are some suggestions:

  1. Turning off the UAC (user account control) will solve the problem.
  2. If I can run this console by double clicking it, it will work fine even if UAC is on.
  • 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-06-07T08:47:02+00:00Added an answer on June 7, 2026 at 8:47 am

    If it’s returning null rather than throwing an exception, then it’s not a permissions issue – it’s that the key doesn’t exist. OpenSubKey:

    If the specified subkey cannot be found, then null is returned.

    (And, note the exceptions listed above there):

    SecurityException The user does not have the permissions required to read the registry key.

    So, the likely issue is that your action is being invoked during the install sequence, when it’s being run by the Windows Installer service – this service runs under the local system account, not under the logged in user’s account.


    Not knowing what you’re trying to achieve with this key, I’m not sure what workaround to suggest. It may be that you can achieve your aims using standard built in facilities within the MSI system – or that you may want to defer this action until the first time you’re program actually runs.

    (What’s possible inside the MSI may vary depending on what you’re using to build it – if you’re currently using a VS Setup project, you’ll be quite limited)

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

Sidebar

Related Questions

I have program, that must interact with a console program before my program can
I have one application that prints messages from Test.exe in console .My java program
Question: I have written a console program that uses the SQL server 2005 web
I'm writing a small program in C that will read input from the console.
I have a program that works fine on VS2008 and Vista , but I'm
I have a Java program that outputs some text into console. It uses print
I have a simple console application that is designed to read a custom Configuration
I have a linux console application - a scientific simulation program that I use.
I have a program that takes the Console output and writes it to a
I have a program that prints UTF-8 string to the console: #include <stdio.h> int

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.