How to Take Ownership of a Item in Vista
INFO: This will show you how to be able to delete or modify a system file, folder, registry key, or drive in Vista by taking Ownership of it. WHY: You will quickly notice that you cannot delete or modify system files, even as administrator in Vista. This is because Vista system files are owned by the TrustedInstaller service by default, and Windows File Protection will keep them from being overwritten. You will encounter a "Access Denied" error. WARNING: Deleting or modifying system files without knowing what you are doing may lead to eratic behavior from Vista. Even complete system failure with full data loss. NOTE: A) If you are trying to delete a folder, then sometimes you will need to delete the contents within the subfolders first before you will be able to delete the main folder itself. B) The hidden My ..... folders are actually a Junction Point to the real username user folders. They cannot be modified since they are not a real location. EX: My Documents for C:\Users\(your username)\Documents For more on junction points, see:
jimmah.com: Why do I get an Access Denied error when trying to open a folder? C) Sometimes you will need to move the file to the desktop or a user folder first before Vista will allow changes to be made to it. You can then move the file back afterwards. D) You will sometimes need to take ownership of Files and folders created in another operating system when migrated into Vista. RELATED LINKS: 1. How to Turn UAC On or Off in Vista 2. How to Enable or Disable the Real Built-in Administrator Account in Vista 3. How to Elevate Administrators Privilege Level in Vista 4. How to Hide or Show Hidden Files and Folders in Vista 5. How to Add Take Ownership to the Context Menu in Vista 6. How to Set and Unset the Read-only File and Folder Attribute in Vista 7. Cannot Rename or Move a File or Folder in Vista Fix 8. How to Restore or Remove the Security Tab in Vista EXAMPLE: You need permission to perform this action NOTE: You will see this Access Denied with the Try Again type message when your user account or group does not have Ownership of the file. Clicking on the Try Again does nothing.
Need_Permission.jpg METHOD ONE: AUTOMATIC WAY: Through the Context (right click) Menu : 1. See:
How to Add Take Ownership to the Context Menu in Vista METHOD TWO: MANUAL WAY: OPTION ONE: Through the Command Prompt : EX. System file: C:\Windows\System32\en-US\winload.exe.mui EX. User name: Brink 1. Open the Start Menu.
2. In the white line (Start Search) area, type
cmd 3. Right click
cmd (at top) and click
Run as administrator. (See screenshot below)
cmd_Start_Menu.jpg 4. Click
Continue button for UAC prompt.
5. In command prompt, type
takeown /f (full path of file) NOTE: Substitute (full path of file) with your file's full path. EX: takeown /f C:\Windows\System32\en-US\winload.exe.mui 6. Press Enter. 7. A message will be displayed that this completed successfully. This will give you ownership of the file.
8. In same command prompt, type
icacls (full path of file) /grant (your username):F NOTE: Substitute (full path of file) with your file's full path and (your username) with your current username. EX: icacls C:\Windows\System32\en-US\winload.exe.mui /grant Brink:F 9. Press
Enter.
10. A message will be displayed that this completed successfully.
NOTE: You should be able to delete or modify the file now. If you still can't, you may need to reboot into Safe Mode and try this again. It may vary according to the file. Some are more stubborn. OPTION TWO: Through a Windows Explorer Window : 1. Go to the file, folder, drive, or registry key you want to delete or modify.
NOTE: For example, the system file: C:\Windows\System32\en-US\winload.exe.mui
2. For a File, Folder, or Drive :
A) Right click on the file, folder, or drive and click Properties. EX. File: winload.exe.mui WARNING: Do not do this to the hard drive partition that Vista is installed on. It can mess up the boot files.
B) Go to step 4
3. For a Registry Key :
A) Click on the key in the left pane to highlight the registry key (folder).
B) Right click on the key and click
Permissions, or click
Edit (on Menu bar) and click
Permissions.
4. Click on the Security tab and click the Advanced button. (See screenshots below) Properties1.jpgRegistry_Advanced.jpg 5. Click on the
Owner tab. (See screenshot below)
NOTE: For a Registry key, go to step 8 after this.
6. Click on the
Edit button.
7. Click on the
Continue button for UAC prompt.
Owner.jpg 8. Under the
Change owner to section, click on your
user account name and click
OK. (See screenshots below)
NOTE: If you have a check box for Replace owner on subcontainers and objects, then check it if you want to take ownership of them as well. You will not see when taking ownership of just a file. EX. Username: Moderator (Computer Name/Username)
Owner2.jpgOwner2_Folder.jpg 9. Click
OK at the Security pop-up window. (See screenshot below)
NOTE: For a Registry Key, you will not see steps 9 to 12. Go to step 13.
Security.jpg 10.
Click OK. (See screenshot below step 7) 11. Click on the
Edit button. (See screenshot below)
Properties2.jpg 12. Click on the
Continue button for UAC prompt.
13. Click on the
Add button. (See screenshot below)
Permissions.jpg 14. To Type in Your User Account Name -
A) Type in your
user account name in the box under
Enter the objects name to select. (See left screenshot below)
NOTE: For example, Moderator.
B) Click on the
Check Names button.
NOTE: If the username is found, then see right screenshot below. If it is not found, then go to step 15 below to select it.
C) Go to step 16.
Select_User_Groups1.jpgSelect_User_Groups2.jpg 15. To Select Your User Account name -
A) Click on the
Advanced button. (See left screenshot above)
B) Click on the
Find Now button. (See screenshot below)
C) Under
Search results, click on your user account name to highlight it.
NOTE: For example, Moderator. If this is for something like a Flash USB drive, you may also want to select Everyone and give it full permission to. This way you will be able to access it from any user account.
D) Click
OK.
Advanced_Select.jpg 16. Click
OK. (See right screenshot above step 15)
17. Click on your user account name to highlight it. (See screenshot below)
NOTE: For example, Moderator (Computer Name/Username) 18. Check the box for
Full Control.
NOTE: For more information on these permission choices, see:
Windows Help and How-to: What are Permissions? 19. Click
OK.
NOTE: For a Registry Key, you will not see steps 20 and 21. Go to step 22.
Permissions2.jpg 20. Click
Yes in Windows Security pop-up. (See screenshot below)
Confirmation.jpg 21. Click
OK. (See screenshot below step 11)
22. Your Done. You can now delete or modify the item.
Hope this helps,
Shawn