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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:21:07+00:00 2026-06-05T03:21:07+00:00

I am developing an application in Visual C++ 2010, and the application is targeted

  • 0

I am developing an application in Visual C++ 2010, and the application is targeted to Windows 7. There is a task of writing some values to registry that will happen only in some special cases. And since in Windows 7, it is needed to have administrator privileges for doing so. How could I program my application in a way, that when it is needed for doing such actions, it asks for administrator privileges and it would not ask for administrator privileges at start time.
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-06-05T03:21:09+00:00Added an answer on June 5, 2026 at 3:21 am

    Like Mark said, you cannot elevate your privilege on demand. A quick solution would be to write a separate executable that does the writing part and launch it using specific commandline parameters when you need. Of course this executable would have to have the ‘requireAdministrator’ privilege in its manifest.

    You can also design this program as a service and setup an IPC mechanism, say using a named pipe. The pipe itself could be created with a security descriptor that allows normal user access to it ensuring that the program running at lower privilege will be able to write to it.

    The purpose of the second approach is to eliminate the nasty UAC prompt that would appear with the first solution.

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

Sidebar

Related Questions

I have an application that I'm developing in Visual Studio 2010 that utilizes a
I'm developing desktop Qt 4.7.1 application for Windows 7 using Visual Studio 2010 and
I am developing Windows Form Application using Microsoft Visual C# 2010 I have two
I'm developing an asp.net application on windows 7 visual studio 2010, then publishing it
I am using Visual C++ 2010 developing 32bit windows applications. There is something I
We are developing C# 4.0 windows based application using visual studio 2010. Now we
I'm developing a Windows Forms application using Visual Studio 2008 C# that uses an
I am using Windows 7 and developing a chat-like application with Visual Studio 2010.
I am developing a c++ console application in visual C++ 2010 that is required
I'm Developing a small windows application in C#.net in Visual Studio 2010 with framework

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.