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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:40:34+00:00 2026-05-10T14:40:34+00:00

For my C# app, I don’t want to always prompt for elevation on application

  • 0

For my C# app, I don’t want to always prompt for elevation on application start, but if they choose an output path that is UAC protected then I need to request elevation.

So, how do I check if a path is UAC protected and then how do I request elevation mid-execution?

  • 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. 2026-05-10T14:40:34+00:00Added an answer on May 10, 2026 at 2:40 pm

    The best way to detect if they are unable to perform an action is to attempt it and catch the UnauthorizedAccessException.

    However as @DannySmurf correctly points out you can only elevate a COM object or separate process.

    There is a demonstration application within the Windows SDK Cross Technology Samples called UAC Demo. This demonstration application shows a method of executing actions with an elevated process. It also demonstrates how to find out if a user is currently an administrator.

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

Sidebar

Related Questions

I have a dialog in an Android app that I don't want the user
I want to implement a feature in my app but I don't know the
I want to make a menu in my android app but I don't want
Interested in writing an iPhone app but don't want to buy a mac or
I have some views in my app that I don't want to suport orientation.
I have a problem that in my app i don't want to show any
I'm currently developing a wp7 app (don't want to tell too much ;), but
I'm developing a Windows Phone 7 app but don't want to re-implement my own
I have some classes in my app that don't require an ID to be
I want to use many bars like this one in my app (i don't

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.