The Windows operating system has put certain restrictions in place when it comes to accessing some files and folders. And we aren’t just talking about administrative-level access, infact there exist some locations that you wouldn’t be able to access even if you are logged in as an administrator. This strict measure has been put in place by Windows to prevent the OS from being manipulated or used in a manner that might result in its non-functionality. So then why would one want to take ownership of files and folders in Windows 11?
Well, there could be quite a few genuine use-case scenarios wherein you would like to get this job done. For instance, you want to delete or modify a certain file present in that location or there are a few folders present in that directory from a user account that has since been deleted or you just wish to tweak some system files present there [such as notepad.exe]. In all these cases, your best bet is to take ownership of those files and folders on your Windows 11 PC. And this guide will show you how to do just that. Follow along.
How to Take Ownership of Files and Folders in Windows 11
There exists a couple of methods through which you could carry out this task and we have listed them below. Try out the one that is in sync with your requirements.
Via Command Prompt
- Launch Command as an admin and change the directory using the cd command to the location where you have the desired file/folder.
- For instance, let’s say we wish to perform this tweak in the WindowsApp folder present in the Program Files. So the command will be:
cd C:\Program Files
- Now, use the below two commands to take ownership of that “folder” in Windows 11:
takeown /f foldername /r /d y icacls foldername /grant administrators:F /t
- Make sure to replace the foldername from the above two commands accordingly. For instance, in our case, it’s the WindowsApps folder, so the command will be:
takeown /f WindowsApps /r /d y icacls WindowsApps /grant administrators:F /t
- On the other hand, if you want to take ownership of a “file” in Windows 11, then use the following two commands:
takeown /f filename icacls filename /grant administrators:F
- Again, make sure to replace the filename from the above commands accordingly. For example, let’s take ownership of the Windows Media Player EXE file named wmplayer.exe (present inside C:\Program Files\Windows Media Player):
takeown /f wmplayer.exe icacls wmplayer.exe /grant administrators:F
That’s it. These were the steps to take ownership of files and folders in Windows 11 via Command Prompt. Let’s now list out the steps to get this job done vis Windows Installer.
Via Windows Installer
- Launch File Explorer via Windows+E shortcut and head over to the desired file or folder.
- Then right-click on that file/folder and select Properties > Security > Advanced.
- Now click on the Change button next to Owner: TrustedInstaller.
- Under the “Enter Object Names to select” field, type in administrator and click on the Check Names button.
- It shall now bring up your PC’s administrator name, hit OK to continue.
- The Owner should now be changed from TrustedInstaller to your administrator account.
- Now, checkmark the “Replace owner on sub containers and objects” option situated beneath the Owner field.
- Finally, click Apply > OK to save the changes. Windows will now initiate the process of transferring ownership.
- Once the process is complete, Windows will notify you of the same. And with this, the process stands complete.
So these were the two different methods to transfer ownership of files and folders in Windows 11. All the queries regarding the same are welcomed in the comments section below.