We all customization lovers know that we need to take ownership of a system file before replacing or modifying the file in Windows. Almost all Windows customization stuff require modification of system files for example, you need to edit Explorer.exe file to customize Start ORB in Windows 7, you need to edit authui.dll file to change login screen, etc.
By default, a built-in system account "TrustedInstaller" has ownership and full control of all system files in Windows Vista, Windows 7 and Windows 8, so you need to take ownership and assign full permission to yourself before modifying or replacing the system file.
Taking ownership of a file or folder is very easy. We have provided a ready-made registry script which automatically adds a new option "Take Ownership" in file and folder context menu (right-click menu). So you just need to right-click on a file or folder and select "Take Ownership" option and it automatically makes you the owner of that file/folder and assigns you full permission on that file/folder.
How to Add "Take Ownership" Option to File or Folder Context Menu in Windows
We have also posted a detailed and easy to understand guide which teaches you how to take ownership of a file or folder manually in Windows:
[Guide] How to Take Ownership (Permission) of a File or Folder Manually in Windows?
Now the question comes! Once you have taken ownership of a file and now you want to restore "TrustedInstaller" as default owner of that file, how will you do that? How will you change the owner of a file back to "TrustedInstaller"?
We never realized that someone might need to restore ownership of a file to "TrustedInstaller" until we received following comment from an AskVG reader "KS":
How do I give permissions back to TrustedInstaller, when I changed it, TrustedInstaller wasn't in the list of possible owners anymore??
That was really an interesting point. Once you take ownership of a file or folder in Windows, if you go back to its Properties and try to change the owner back to "TrustedInstaller", you'll be surprised to see that "TrustedInstaller" is no longer present in the users list.
So how to bring back the built-in system user "TrustedInstaller" and set it as default owner of a file or folder? Don't worry! Here is the solution.
Today in this tutorial, we'll tell you how to restore "TrustedInstaller" as default owner of a file or folder in Windows if you changed its owner to yourself?
So without wasting time, lets start the tutorial:
NOTE: The same method will apply to restore "TrustedInstaller" as owner of registry keys in Registry Editor.
1. Go to the folder which contains the file or folder for which you want to restore ownership to "TrustedInstaller". Right-click on the file or folder and select Properties.
2. It'll open its Properties window. Now go to "Security" tab and click on Advanced button.

3. It'll open a new window. Now go to "Owner" tab and you'll see that the owner would be set to your username and "TrustedInstaller" would not be present in the list as we mentioned above.
Don't worry. We'll add it manually. Click on "Edit" button:

4. It'll open another window. Click on "Other users or groups" button.

5. Now type NT SERVICE\TrustedInstaller in "Enter the object name to select" text box and click on OK button as shown in following screenshot:

6. It'll immediately add "TrustedInstaller" to the users list. Click on Apply button.

7. Windows will show a message box, click on OK button to close it. Again click on OK button in all opened windows and you have successfully restored "TrustedInstaller" as default owner of the file or folder.
You can check and confirm the owner by opening the file or folder Properties and you'll see that "TrustedInstaller" has become the owner of that file or folder again.
Posted by: Vishal Gupta | Categories: Troubleshooting, Windows 7, Windows 8, Windows Vista
Ashish Gupta
Nicd guide VG....thnx for this..,....:)
sasja
Nice, most of us wont need it but some will
rishi
Not a good trick for me
rishi
Not a good trick for me
Ravi
vishal bro.
How to Restore “TrustedInstaller” as Default Owner of a File or Folder via command prompt ?
oR
Restore Ownership of system file or folder via command prompt ?
I'm waiting for ur reply
Thanx
VG
^^ I dont think its possible. If I come across any working command, will let you know.
Ravi
hi
7 Copy Delete Animation Modder
software se copy paste animation mod kiya jata hai
jis se shell32.dll ki ownership remove ho jata hai
after next restart
shell32.dll ki ownership restore ho jati hai
means
right click karne pe File Access Denied
so i asked How to possible ?
PeaceSold13r
For the descendants the command to restore TrustedInstaller ownership should be this:
icacls "Full path to file or folder" /setowner "NT Service\TrustedInstaller" /T /C
Ashish
Hi VG
Restoring "TrustedInstaller" as default owner of the file or folder is fine. I think what is more important is restoring the rights as well that make the finally non-renamable as earlier so that viruses can't mess up with it.
How do we do that ?
VG
^^ You'll need to note the default permissions before changing them so that you can restore them in future.
Chuck Bevitt
Important note: In the 'Select User or Group' dialog box, click the 'Object Types' button first and select all of the possible object types (checkboxes). Then enter 'NT Service\TrustedInstaller'. If you haven't allowed a search for all object types, it may come back and say that TrustedInstaller doesn't exist.
Dolores Chan
I ran your restore ownership script but it doesn't seem to work. The Security window does not list TrustedInstaller just the user names of System, Administrators, and Users with full control, etc.
However, the Owner window shows the Current owner as TrustedInstaller with the Permission entries of System and Administrators with full conrol. I tried the manual method but it did not make any changes.
How do I get TrustedInstaller back into the Security window with full control. Your assistance would be appreciated.
By the way, It is a Windows 7 system.