Methods for modifying trustedinstaller permission files (files or folders cannot be deleted)

Source: Internet
Author: User
Tags trustedinstaller

Methods for modifying trustedinstaller permission files (files or folders cannot be deleted)

In Windows 7, a virtual account, trustedinstaller, sometimes needs to modify some system files/folders on drive C,

Or delete the file, "you need the permissions provided by trustedinstaller to modify this file" is displayed ". This method can be used to remove this restriction.

Some files/folders that cannot be deleted in the system can be easily deleted using this method.

Tools/Raw Materials
  • Win7 system, method 1 does not require other additional tools.

  • Method 2: Use the built-in notepad.

STEP/Method
  1. Method 1: simple and fast. Remember to perform the same steps on any win7 computer.

  2. Right-click the file to be modified-attributes

  3. Switch to the "Security" tab and click "advanced.

  4. Switch to the "owner" tab

    Generally, the default owner is trustedinstaller (no effect). Click "edit ".

  5. In the displayed window, select the Login User Name of the current computer and click OK.

  6. In the displayed dialog box, click OK.

  7. Click OK for all the subsequent windows.

  8. Right-click the file again, and choose Properties, security, and edit.

  9. Select the current user name, select "allow" for full control, and click "OK ".

  10. If this window appears, click OK.

  11. Click "OK" to close the previous window, and you can modify or delete the file/folder as needed.

  12. Method 2: Solve the problem once and for all.

  13. Open notepad and copy and paste the following code:

    ======================================================= ==========

    Windows Registry Editor Version 5.00

    [Hkey_classes_root \ * \ shell \ RunAs]

    @ = "Get trustedinstaller Permissions"

    [Hkey_classes_root \ * \ shell \ RunAs \ command]

    @ = "Cmd.exe/C takeown/f \" % 1 \ "& icacls \" % 1 \ "/grant administrators: F"

    "Isolatedcommand" = "cmd.exe/C takeown/f \" % 1 \ "& icacls \" % 1 \ "/grant administrators: F"

    [Hkey_classes_root \ directory \ shell \ RunAs]

    @ = "Get trustedinstaller Permissions"

    "Noworkingdirectory" = ""

    [Hkey_classes_root \ directory \ shell \ RunAs \ command]

    @ = "Cmd.exe/C takeown/f \" % 1 \ "/R/d y & icacls \" % 1 \ "/grant administrators: F/T"

    "Isolatedcommand" = "cmd.exe/C takeown/f \" % 1 \ "/R/d y & icacls \" % 1 \ "/grant administrators: F/T"

    ======================================================= ==========

  14. Save the file as a file with the extension Reg (note that all files (*. *) are selected in the SAVE type; otherwise, the file will be saved as a TXT file ).

  15. Double-click the saved file.

  16. Click Yes in the User Account Control Window.

  17. Click Yes in this window.

  18. Success. Right-click any file or folder and choose "obtain trustedinstaller permission" from the menu. Click this option. If yes is displayed in the User Account Control window, then a black window appears (if the number of files to be processed is small, the black box will flash and even disappear). After the black window is closed, you can delete and modify the file/folder as needed.

Notes
  • The code in method 2 can be copied and pasted directly. Do not add line breaks, spaces, and so on. Otherwise, the Code may become invalid.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.