Add “Restore Ownership to TrustedInstaller” Option in Files and Folders Context Menu in Windows

In Windows Vista, Windows 7, Windows 8 and 8.1, almost all system files are under “TrustedInstaller” control. Its a system user account which has ownership of almost all system files.

If you are a Windows customization lover, you must be knowing that before replacing a system file to customize Windows look-n-feel, you first need to take ownership of the file. Ownership can be taken either manually or using a context menu option as mentioned in following articles:

But sometimes you might need to restore ownership of the file or folder to TrustedInstaller. We have posted a tutorial to restore ownership of files or folders to TrustedInstaller in past:

Advertisement

And now today in this article, we are going to make your life easier. Now you’ll not need to manually restore ownership of a file or folder to TrustedInstaller because we are going to provide a ready-made registry script which will add a new option “Restore ownership” in files and folders context menu (right-click menu).

Restore_Ownership_to_TrustedInstaller_Context_Menu_Option.png

Once this option is added, you can simply right-click on a file or folder and select “Restore ownership” option and it’ll restore “TrustedInstaller” as owner of that file or folder.

To add the option, download following ZIP file, extract it and run the extracted REG file. It’ll ask for confirmation, accept it:

An extra uninstallation registry script is also available in the above ZIP file in case you want to remove the option from context menu.

Thanks to our reader “PeaceSold13r” for sharing the command to restore ownership to TrustedInstaller which inspired us to create this automatic registry script…

Advertisement

Following video demonstrates this context menu option live in action:

Published in: Windows 10, Windows 7, Windows 8, Windows Vista

About the author: Vishal Gupta (also known as VG) has been awarded with Microsoft MVP (Most Valuable Professional) award. He holds Masters degree in Computer Applications (MCA). He has written several tech articles for popular newspapers and magazines and has also appeared in tech shows on various TV channels.

Comments

NOTE: Older comments have been removed to reduce database overhead.

  1. Good one!

    I edited the reg file to match my own language (“Restaurar propriedade” instead of “Restore ownership”).

    Thanks VG!

  2. [HKEY_CLASSES_ROOT\Drive\shell\restoreownership]
    @=”Restore ownership”
    “HasLUAShield”=””
    “NoWorkingDirectory”=””

    [HKEY_CLASSES_ROOT\Drive\shell\restoreownership\command]
    @=”cmd.exe /c icacls \”%1\” /setowner \”NT Service\\TrustedInstaller\” /T /C”
    “IsolatedCommand”=”cmd.exe /c icacls \”%1\” /setowner \”NT Service\\TrustedInstaller\” /T /C”

    Just add this lines to the .reg file. By the way it’s not recommended to use this command for drives, because it will operate recursively and change the owner of all files and folders.

  3. i’m seeking

    RESTORE OWNERSHIP to default!
    RESET PERMISSION to default!
    or REBUILD SECURITY!

    from CONTEXT MENU!

  4. will this restore to default owner & permissions? or restore everything to “trustedinstaller”?
    what if the default “owner” is not “Trustedinstaller”? some where possibly “System” or “Administrator” before I changed were made…
    computer not able to: “system restore” ” system refresh” or “reinstall windows” or “connect to web” or “update windows”
    windows 8
    Thank you

  5. Thanks for all this great information. I have a question. I accidentally used the “Take ownership” command my system drive and all sub folders, as you can imagine that created a huge problem. No system restore point. I have fixed almost everything, but certain windows updates will not install correctly. I have troubleshooted this problem for the past 12 months(legit), I have come to the conclusion that they won’t install because of this “take ownership” SNAFU. I would really like to use this “Restore Ownership” to trusted installer on my system drive and all sub folders, but I think that will cause even more problems. What do you think?

  6. ^^ You can repair Windows instead using setup disc. It’ll restore default permissions.

  7. can i have both restore and take ownership context(because if i install take ownership the restore will be missing)

  8. ^^ Since the commands can be used with Administrative privileges, we need to use them by replacing the built-in “Run as administrator” option. If we add the commands by creating new Registry keys, they’ll not work.

  9. Thanks much !!! Couldnt figure out how to restore ownership to TrustedInstaller.All fixed now 🙂

  10. I tried this on Win 2012 server on c:\windows\system32 and it is not changing back. I had to set the owner to domain admins to add a read permission for a service account…long story

    Is there something special I need to do? I even put UAC back on to make it elevate

    thanks,

    Rich

  11. Please ignore my post. I did not have full admin with my admin account. I gave myself explicit full control and it worked splendidly

    Apparently domain admins group did not allow me. I had to be explicit

    Cheers,

    PS: Private me your paypal….i’d like to buy you a coffee

Leave a Comment

Your email address will not be published. Required fields are marked *

NOTE: Your comment may not appear immediately. It'll become visible once we approve it.