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 7877023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:15:55+00:00 2026-06-03T03:15:55+00:00

I have an application that under rare circumstances needs to change its registry setting.

  • 0

I have an application that under rare circumstances needs to change its registry setting. Also during it’s first execution it needs to create a new key. I’m developing this in Windows 7. I get ThrowUnauthorizedAccessException. How do I force Windows to give me a UAC prompt to temporarily elevate my permissions?

Thanks in advance.

  • 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-03T03:15:56+00:00Added an answer on June 3, 2026 at 3:15 am

    Should all users be allowed to modify this setting? If so, the simplest solution is to modify your installation program to give Users Full Control of the registry key.

    If only administrators should be able to modify this setting, then you will need to launch another copy of your program, asking Windows to elevate it:

    ProcessStartInfo startInfo = new ProcessStartInfo("C:\Path\To\MyApplication.exe");
    
    startInfo.Verb = "runas"; //trigger a UAC prompt (if UAC is enabled)
    
    System.Diagnostics.Process.Start(startInfo);
    

    If you were smart you would include some command line arguments, so you can tell “yourself” that it should jump straight to the part of the software that the user needs to deal with. Or your command line arguments could just say what you want done:

    ProcessStartInfo startInfo = new ProcessStartInfo(
          "C:\Path\To\MyApplication.exe", 
          "/setLoggingEnabled yes");
    
    startInfo.Verb = "runas"; //trigger a UAC prompt (if UAC is enabled)       
    
    System.Diagnostics.Process.Start(startInfo);
    

    Have your application check for the setLoggingEnabled switch, make the change, and then exit.

    Update: A common situation is players of World of Warcraft. Since the game is allowed to update itself while running, all users must be allowed to modify the game data sitting in Program Files. The correct and valid action is to modify the ACLs on the

    C:\Program Files\Blizzard\World of Warcraft
    

    folder so that all users have full control. In fact, before Blizzard got their act together, Microsoft released an application compatibility update that gives all users full control to the WoW folder next time it run as an administrator.

    Another common case is when the Blizzard Launcher is launched with administrative privelages, it updates a registry key in HKLM, recording where the game is. This happens when, for example, i move WoW from a hard drive to an SSD drive

    run the launcher once as an administator so that the updaters work correctly.

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

Sidebar

Related Questions

I have an c# winform application that runs under a local account but needs
I have an application that needs to copy some files to a directory under
I have a web application that runs fine under IIS5 or IIS6. I just
I have a Qt application that I'm deploying with Qt 4.8.1 under Windows 7
I have an application running under WebLogic that is using standard forms authentication. The
I have two application that need to talk to each other. App1 needs to
I have an application that needs to work with a vendor-supplied API to do
I have an ASP.NET application that runs under Classic .NET AppPool. I'm trying to
I have an application that needs to store data. Currently, I am using the
I have configured my web application to run under windows authentication mode, I also

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.