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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:46:21+00:00 2026-05-10T21:46:21+00:00

I have created an application that writes some data to the root folder of

  • 0

I have created an application that writes some data to the root folder of the directory in which it was installed (in Program Files). But under Windows Vista, the program is unable to write to the directory because the UAC restricts administrative privileges.

I need to be able to do the following

  1. Write a file in the folder where the program was installed in program files.

That’s possible if the software is run with administrative privileges. But I don’t know how to modify my setup to always run it with administrative privileges.

Are there any ways or suggestions I can accomplish this?

  • 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-10T21:46:21+00:00Added an answer on May 10, 2026 at 9:46 pm

    It sounds like the title of your question asks how to make the installer run with administrative privileges but your explanation asks how to make the program run with administrative privileges so it can write to Program Files at runtime. Which one is it?

    If you really just want the installer to run with administrative privileges, the community wiki answer is pretty accurate. Make sure your installer has an obvious name like ‘Setup.exe’ and Vista uses ‘heuristics’ to decide your installer must run as admin.

    If you really want to write to Program Files at runtime, don’t. This is the official advice for Vista: write to the user’s AppData directory instead. If you have way too much code to rewrite, you can include a manifest file that forces Vista to prompt for administrative rights when running your app. If your app is named ‘app.exe,’ include a ‘app.exe.manifest’ file that contains the following:

    <assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestversion='1.0'> <assemblyidentity version='1.0.0.0' processorarchitecture='X86' name='app.exe' type='win32'> <description>My Application</description> <trustinfo xmlns='urn:schemas-microsoft-com:asm.v3'> <security> <requestedprivileges> <requestedexecutionlevel level='requireAdministrator'> </requestedexecutionlevel> </requestedprivileges> </security> </trustinfo> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an application that uses settings.settings to store some user specific settings
I have created an application that does the following: Make some calculations, write calculated
in my C#-Silverlight-3-Application, I have created a class, that is doing some calculations that
I have created an application that connect on a web-server and reads an xml
I have created an application that records a series of longitude and latitude values
I have created an application that creates bar graph based on inputs read from
I have a problem regarding Android App. I have created an application that download
I have created an android application that calls (using kSOAP library) a SOAP based
I have created one application in flex that is accessing the Java webservice using
I have created an application server side that will create a pdf of a

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.