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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:06:22+00:00 2026-05-18T00:06:22+00:00

This existing question on SO is probably exactly what I need, but it wasn’t

  • 0

This existing question on SO is probably exactly what I need, but it wasn’t answered. 😉

I hadn’t realized this in my initial testing of my WiX installer, but my application doesn’t work properly on Windows 7 after it’s been installed. Various assemblies need to read/write files in my installation folder, but access is denied at runtime.

If I then run the application as an administrator, it works perfectly. I can also change the properties of the application manually so that it always runs as an administrator. However, I don’t want the user to have to click Yes to the UAC prompt every time.

The part I don’t get is that if I run my executable from my source code folder, I don’t have to run it as an administrator and it works perfectly.

Can anyone explain why:
1. My executable, when run from my bin/Debug folder, doesn’t need to be run as an administrator and works?
2. How I can get WiX to install the executable so it works exactly the same way? (i.e. doesn’t require right-click + Run as Administrator)

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-05-18T00:06:23+00:00Added an answer on May 18, 2026 at 12:06 am

    Programs generally shouldn’t be diddling with things in the Program Files folder, but if you do need to do this, you will need to ensure that the permissions on your program’s installation folder are set as part of the installation process.

    Now that I have berated you for trying to do this, I will give an example from a WiX installer for a program that I maintain that does this same sort of naughty log file writing:

    <Directory Id="DirectoryLogs" Name="Logs">
        <Component Id="ComponentCreateFolderLogs" Guid="SOME-GUID">
            <CreateFolder>
                <Permission
                    GenericAll="yes"
                    User="Authenticated Users" />
            </CreateFolder>
            <RemoveFile
                Id="RemoveFileLogsAll"
                Name="*.*"
                On="uninstall" />
        </Component>
    </Directory>
    

    So the installer will create the Logs folder, give all Authenticated Users NTFS permissions to wreak havoc on that directory, and blow away all of the log files that were created after the original installation as part of the uninstall process to leave a clean uninstall.

    Is it great design? No–Windows logo requirements freak out about this–but it happens a lot especially in internal environments, so this is how you do it.

    Good luck!

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

Sidebar

Related Questions

This is probably a stupid question. I don't know anything about Web Service but
I know this question is probably stoopid. But I just don't want to cause
I feel like this is probably a pretty simple question, but this is my
this is not a primary key, but merely used as a marker in existing
This might seem like a stupid question I admit. But I'm in a small
This is a difficult and open-ended question I know, but I thought I'd throw
I apologize if this question is vague, but I want to build a drop
Probably a stupid question but I'm still trying to wrap my head around nHibernate.
With MOSS 2007 (the question is probably applicable to WSS as well but I'm
Some existing web services I consume have methods that look something like this: List<Employee>

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.