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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:49:12+00:00 2026-05-25T18:49:12+00:00

When I install my .NET program to C:\Program Files and I run it, it

  • 0

When I install my .NET program to C:\Program Files and I run it, it doesn’t ask for Admin Rights (Win7), but it can’t open any file in the application’s directory unless I give admin rights to it manually. If it’s not on C, it works well.

I know I can add a custom manifest file to my application to ask the user for admin rights, but it’d ask it always, even when it’s not required.

I read on SO that that the software shouldn’t write anything to Program Files after it has been installed, but it can’t even read a file (for example, language files). I have a database file too, which is read and written by the program, so where should I place this file?

So I’m wondering if it is normal not to have access to read a file without admin rights. How can I make the program ask for admin rights only if it’s necessary?

EDIT I’m logged on as system admin.

  • 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-05-25T18:49:13+00:00Added an answer on May 25, 2026 at 6:49 pm

    A normal User does not have write privileges in the Progrem Files folder. You should be able to read (content) files however. How do you open you for-reading files?

    The proper way is to use a designated folder. Using WinForms that would be something like

    string dataFolder = Environment.GetFolderPath(
          Environment.SpecialFolder.ApplicationData);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to install the .NET Framework 4.0 to run a program, and I've
I have a .Net program that I want to install on a terminal server.
I need to create an installer program that will do install the following: ASP.Net
Can I safely download and install .Net framework 3.5 SP1 without requiring my customers
I went to http://www.asp.net/mvc/ to try to install ASP.NET MVC. I didn't know, but
I have NUnit installed at this directory. C:\Program Files\NUnit 2.5.5\bin\net-2.0 I made the directory
I am trying to run this example program - http://pysnmp.sourceforge.net/examples/1.x/snmpbulk.html I am on Mac
So I've tried to install net::ssh::multi on mac using gems: gems install net-ssh-multi The
I'm trying to install a .NET service I wrote. As recommended by MSDN, I'm
I have a blogengine.net install that requires privatization. I'm doing research work at the

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.