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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:37:46+00:00 2026-06-11T00:37:46+00:00

Sometimes I need to delete or replace a dll file in system32 folder of

  • 0

Sometimes I need to delete or replace a dll file in system32 folder of windows 7.
The code below always has Permission Denied Error :

            if (File.Exists(@"C:\Windows\system32\mydll.dll"))
            {
                fileInfo.IsReadOnly = false;
                File.Delete(@"C:\Windows\system32\mydll.dll");
            }

How can I bypass this error and replace a file in system32 folder?

  • 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-06-11T00:37:48+00:00Added an answer on June 11, 2026 at 12:37 am

    A user doesn’t have sufficient rights to delete files from c:\windows\system32 on Windows Vista and up. Even when logged-on using an administrator account. UAC puts a stop to it. You must ask for elevation to let the user know that you are about to tinker with the private parts. That requires embedding a manifest in your program to trigger the UAC prompt. This answer shows you how.

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

Sidebar

Related Questions

I sometimes need to look for information for a special portion of code. When
In my app I sometimes need to rebuild and repopulate database file. SQLite databse
Sometimes you need to create a very simple single file application in Qt4. However
Sometimes I need to make a UITableView that resembles a menu and has rows
Sometimes I can't delete a folder, because it contains thumbs.db . I have a
I use AIR HTML component, and I need to delete cookies sometimes. I have
I sometimes need to debug JS in other browsers, and it would be really
I sometimes need to run gacutil.exe or installutil.exe, etc. from the command line. Is
In the form designer, I sometimes need to see the type of a property,
Sometimes I need to modify a third party library for my specific needs. It

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.