How to take ownership of files in Vista/Win7

Status
Not open for further replies.

KSoD

Call me Mak or K, Mod Emeritus
Messages
35,644
Location
C:\
Alright since it seems that so many people have questions about how to do this i will give you a nice complete guide on how to take ownership of a file in Vista. First you have to select the file you want to take ownership of. From there right click and select properties. You get this screen:

Properties.jpg


From here select the security tab. The screen will look like this:

Securitytab-1.jpg


Click the Advanced button. It will bring this screen up:

Advancedbutton-1.jpg


Now click the Owner Tab. The screen will look like this:

ownertab-1.jpg


From here you click Edit to get this screen:

editbutton-2.jpg


If you want to take ownership of all files and folders in the subfolder of the main folder, say if you are taking control of a folder from XP like My Documents and you do not want to have to do it for each folder, check the box that says "Replace owner on sub-containers and objects." This will allow you to take ownership of all files and folders at once.

Now you select the User Account you want to give the permission to. Then click Apply. A message will pop up telling you that if you have just taken ownership you have to close and reopen the objects properties before you can view or change properties again. Click okay and get back to the Computer screen. You should now have full authority to do what you wish with that file. I hope this helps.

Added 11/5/2008:

How to do it using cmd prompt


This is just a simple command to take the ownership of a file in Windows Vista.

1. Open Start menu and enter cmd in the Search box.

2. Navigate to your file's directory in the command prompt. ( e. C:\Files\myfile.exe)

Then type in the following command:

Code:
takeown /f myfile.exe

You should get a success message once this is completed.

SUCCESS: The file (or folder): "C:\Filesz\myfile.exe" now owned by user "ComputerName\username"

where

ComputerName = Your Computer's Name
username = Your user name

3. That will give you ownership of the file, but you still have no rights to delete it. Now you can run the cacls command to give yourself full control rights to the file:

Code:
cacls myfile.exe /G username:F

You need to substitute your user name in place of username .


Notes
-----
To take ownership of a folder and all its content, you can add the /r switch for recursive execution:

Code:
  takeown /f . /r

You can also use the /a switch to make the ownership go to the Administrators group instead of the current user:

Code:
  takeown /f intlcfg.exe /a

**NOTE**

XP Users check out this:

How to take ownership of a file or a folder in Windows XP
 

SteveO712

Solid State Member
Messages
12
Status
Not open for further replies.
Top Bottom