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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:02:52+00:00 2026-05-27T00:02:52+00:00

I have a program that needs to create a text log. In XP, everything

  • 0

I have a program that needs to create a text log. In XP, everything worked just fine, but when I tested it on Windows 7 – and was later Upgraded to Windows 7 for my Dev Computer – I get an error that “Access to the path ‘C:\Program Files (x86)\Ludlum Measurements, Inc\LMI Universal Software\UniversalLog\’ is denied”. I get the a similar error if I have the installer create the folder and then try to create a text file in the folder.

I know this has something to do with permissions, but what should I give permission and how?

The programs that use the logging function?

The folder that the logs go into?

The folder the programs are in?

And how would this fix work under XP, Vista, Server 2005, and Server 2008 and as service (Part of the program runs as a Windows form, and part as a service)?

-Edit-
Emphasis added.

To reiterate: How will this work when installed and ran on an XP? A Server 2003? A Server 2008? Will this cause any problems for them?

And a new question: Can my program access files from the ApplicationData file? I just remembered the entire problem stemmed from me trying to create a config file that holds connection information for to an SQL database. Hitting your head against a brick wall for a day tends to make you forget why you started doing it in the first place. And again, this originally worked in XP, Server 2005, and Server 2008.

  • 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-27T00:02:53+00:00Added an answer on May 27, 2026 at 12:02 am

    You should use Environment.GetFolderPath and pick a Environment.SpecialFolder folder that has write permissions when the UAC is on and write your log files there.

    By default under UAC you donot have permissions to write to C:\Program Files or its subfolders.

    Environment.ApplicationData is usually a good choice, it will be writable by default on XP , Vista , Server 2005 and Server 2008 unless the admin has locked stuff down too much

    Teach Your Apps To Play Nicely With Windows Vista User Account Control is a good resource on how to write an application that behaves nicely under UAC

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

Sidebar

Related Questions

I have a Python script that needs to execute an external program, but for
I have a program that needs to run as a separate NT user to
I have a program that needs to run as a normal user most of
I have a program that needs several third-party libraries, and at the moment it
I have a program that needs a lot of memory and want to set
I have a Perl program, that needs to use packages (that I also write).
In an embedded program I have a screen object that needs to manage a
I have a program that I need to run under *nix and windows. because
I have a program that needs to use sleep. Like really needs to. In
I have a program that reads a huge text file (line by line) and

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.