Vista: How To Take Ownership of a System File

Contributor Icon Contributed by shamanstears Date Icon March 15, 2007  
Tag Icon Tagged: Microsoft Vista

If you are trying to tweak or modify your Vista system, you will run into a barrier when it comes to replacing or changing system files. You can take ownership of the file and then grant your username full control of the file. After you have made your changes and/or modifications, you can then remove the permissions.


First you will need to access an elevated command prompt, to do this:

1. Click the Start button.

2. Click All Programs.

3. Go into Accessories.

4. Right-click on Command Prompt.

5. Select Run as administrator.

6. When the UAC Prompt appears, click Continue.

Once you have your elevated command prompt, follow these steps:

For our example, we are going to use the Bubbles screensaver file (Bubbles.scr)

1. At the command prompt, input takeown /f filepath (takeown /f c:\windows\system32\Bubbles.scr).

2. Press Enter on the keyboard.

3. A message will be displayed that this completed successfully.

4. Now input icacls filepath /grant yourusername:f (icacls c:\windows\system32\Bubbles.scr /grant shamanstears:f).

5. A message will be displayed that this completed successfully.

You will now be able to modify or replace the file. When you are done, simply remove the permissions to keep the file secure.

Previous recipe | Next recipe |
 
  • Anonymous
    Will this work on entire folders and drives or only on single files?
  • Serizzim
    Thank you a lot, solved my issue. And yes, it does work on whole folders.
  • Hassan
    Thanks that works.
  • ray
    it doenst work with \system32
  • Uwe
    Hi,
    do you have an idea to install open office under Vista?
    Someone told me that I have to rename the file mscoree.dll in folder \windows32.
    But that doesn´t work with the idea above.

    regards
    Uwe
  • Tim
    it won't accept my username
  • Trevv
    It won't accept username
    Invalid parameter "UserName:F"
  • Uwe
    hi,
    that doesn´t work for the file mscoree.dll in folder windows32

    regards
    Uwe
  • Mike
    Thank you so much.

    I was getting to the point of dispair with not being granted access to the root of my F:\ drive.

    Worked perfectly
  • calv7n
    Hi, thanks very much for the tip. I've been able to rename my mscoree.dll folder in system 32 (but it didn't solve my problem unfortunately!). I'd like to remove the premissions now, but I don't how to do it. Can anybody help? Thank you in advance
  • Leito
    Thanks for that tip, it works well on my Vista and I'm glad for that (:
    But can you give us the commande to remove permissions?
  • Leito
    I just found how to take off permissions :

    icacls filepath /deny yourusername:f (=take off the 'grant')
  • rwolf
    I tried the above instructions, but the response I got when trying to get it to "grant" was the following:

    user name: No mapping between accounts names and security ID's was done.
    Successfully processed 0 files; Failed processing 1 files.

    What does that mean and how can I correct this?
  • tamasfodor
    i tried to do it but all it said after i`ve typed the file name in to the window it said cant associate the file go to set association control panel and select , etc
  • Chuck
    Everyone who offers this guidance seems to ignore a really fundamental question. Is "takeown" permanent? What about restoring file ownership to its original state when you're done modifying, especially for system files? How do you do that?
  • Stephanie
    what happens if you can't locate you file path? You can trace it through Start then Computer then C: Drive then Program Files then Common Files then Microsoft Shared then etc...
    But when my screen says: takeown /f c:\programfiles\commonfiles\microsoftshared\..........
    it comes up with "path not found" What am I doing wrong?
blog comments powered by Disqus